-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Several tests in cmdline.pyproject.test result in configuration errors, yet assert == Return code: 0
. This is probably bad; they should probably give a return code of 2, for use error. See, for more information, #6003 (because apparently it isn't documented yet). See also #16764, which may be related.
Originally noted by @sterliakov in #19494 (comment), who also had this to say:
I really think this should be fixed, 2 sounds reasonable and consistent with other tools, most Unix tools do that (
grep --wtf
andls --not-an-option
do exit with 2 on my system, for example, and bad config file is semantically close to bad flags). Note thatmypy --wtf
also exits with 2, so we have a precedent, andruff
exits with 2 if it finds an unknown key in itspyproject.toml
section.