-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
exit() is not a built-in function and is only defined if the site module is imported during Python's initialization (which, for example, can be disabled with -S option passed to the interpreter). You should use sys.exit() instead:
sys.exit(os.spawnv(os.P_WAIT, ruff, [ruff, *sys.argv[1:]]))
_Originally posted by @jack1142 in #776
Fixed, thanks. (Ruff should have a rule for this!)
Originally posted by @andersk in #776 (comment)
I would like to implement it.
In which rule group would this be added?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule