You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raise SystemExit(arg) and sys.exit(arg) are identical in behavior, one should be favored over the other for consistency.
Reasoning
I don't know which of the two would be preferable for this linter (I suspect sys.exit(arg), but raise SystemExit(arg) doesn't require any imports), but several other contexts where multiple forms are valid have a rule enforcing one form as the standard (such as single vs double quotes, or string formatting methods), and I figure the same logic should apply here.
The text was updated successfully, but these errors were encountered:
quit(arg) and exit(arg) should also be prohibited under this rule, as those are from the site module and are only intended to be used for the REPL; as such, they may not be loaded at all when a script runs.
Rule request
raise SystemExit(arg)
andsys.exit(arg)
are identical in behavior, one should be favored over the other for consistency.Reasoning
I don't know which of the two would be preferable for this linter (I suspect
sys.exit(arg)
, butraise SystemExit(arg)
doesn't require any imports), but several other contexts where multiple forms are valid have a rule enforcing one form as the standard (such as single vs double quotes, or string formatting methods), and I figure the same logic should apply here.The text was updated successfully, but these errors were encountered: