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
#!/usr/bin/python3 -Bdefmain():
theMsg='a message we want to use for a RuntimeError'raiseRuntimeError (theMsg)
""" some code that pylint shouldn't be scanning """if__name__=='__main__':
main()
The line pylint is barking on is a comment and therefore it should care whether code flow treats this line as unreachable
Note that I am not running the most current versions of Python and pylint as I only have what RHEL/rocky 9.5 will give me. So if you have already corrected this, I apologize for the noise
I think pylint is working as intended this is not a comment but a string declaration that is not assigned to a variable ? (A comment should be # something). Docstrings should not be in the middle of the code but at the module beginning and after function declaration.
Bug description
Configuration
Command used
Pylint output
Expected behavior
The line pylint is barking on is a comment and therefore it should care whether code flow treats this line as unreachable
Note that I am not running the most current versions of Python and pylint as I only have what RHEL/rocky 9.5 will give me. So if you have already corrected this, I apologize for the noise
Pylint version
OS / Environment
Rocky Linux release 9.5 (Blue Onyx)
Additional dependencies
The text was updated successfully, but these errors were encountered: