---
source: crates/ruff/src/rules/pylint/mod.rs
---
sys_exit_alias_0.py:1:1: PLR1722 [*] Use `sys.exit()` instead of `exit`
  |
1 | exit(0)
  | ^^^^ PLR1722
2 | quit(0)
  |
  = help: Replace `exit` with `sys.exit()`

ℹ Suggested fix
1   |-exit(0)
  1 |+import sys
  2 |+sys.exit(0)
2 3 | quit(0)
3 4 | 
4 5 | 

sys_exit_alias_0.py:2:1: PLR1722 [*] Use `sys.exit()` instead of `quit`
  |
2 | exit(0)
3 | quit(0)
  | ^^^^ PLR1722
  |
  = help: Replace `quit` with `sys.exit()`

ℹ Suggested fix
  1 |+import sys
1 2 | exit(0)
2   |-quit(0)
  3 |+sys.exit(0)
3 4 | 
4 5 | 
5 6 | def main():

sys_exit_alias_0.py:6:5: PLR1722 [*] Use `sys.exit()` instead of `exit`
  |
6 | def main():
7 |     exit(2)
  |     ^^^^ PLR1722
8 |     quit(2)
  |
  = help: Replace `exit` with `sys.exit()`

ℹ Suggested fix
  1 |+import sys
1 2 | exit(0)
2 3 | quit(0)
3 4 | 
4 5 | 
5 6 | def main():
6   |-    exit(2)
  7 |+    sys.exit(2)
7 8 |     quit(2)

sys_exit_alias_0.py:7:5: PLR1722 [*] Use `sys.exit()` instead of `quit`
  |
7 | def main():
8 |     exit(2)
9 |     quit(2)
  |     ^^^^ PLR1722
  |
  = help: Replace `quit` with `sys.exit()`

ℹ Suggested fix
  1 |+import sys
1 2 | exit(0)
2 3 | quit(0)
3 4 | 
4 5 | 
5 6 | def main():
6 7 |     exit(2)
7   |-    quit(2)
  8 |+    sys.exit(2)


