-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
C: invalid-nameFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Description
Bug description
In file __main__.py, I have this:
def main() -> int:
# ...
if __name__ == '__main__':
exit_code = main()
raise SystemExit(exit_code)Configuration
Not using a configuration file. All default options.Command used
pylint basketcase.__main__Pylint output
src/basketcase/__main__.py:385:4: C0103: Constant name "exit_code" doesn't conform to UPPER_CASE naming style (invalid-name)Expected behavior
Pylint thinks exit_code should be named EXIT_CODE, as if it were a constant. The function main returns an integer that can currently be 1 (error) or 0 (no error).
Pylint version
pylint 4.0.4
astroid 4.0.2
Python 3.12.3 (main, Nov 6 2025, 13:44:16) [GCC 13.3.0]OS / Environment
elementary OS 8 (based on Ubuntu 24.04).
VSCodium terminal, version 1.106.37943.
Additional dependencies
Metadata
Metadata
Assignees
Labels
C: invalid-nameFalse Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation