-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add constants naming rules #49
Comments
I'm curious to know how pylint detects constants. Note that if a constant literal ( I'd say doable, but requires a more in depth introspection. |
@5j9 I would say that 'Module level variable' is better. And by convention we name these variables as UPPER_CASE. |
Ah, in that case we do not agree on what is considered a constant. |
I'm looking at the differences between pylint and pep8-naming (through flake8) and came across this page. Has there been any development on this in the past year? |
Any update on this? Is anyone using any other plugin other than pylint for this? |
I use |
I tried adding this, but it takes too much time to complete the scan. |
I made a small plugin for flake8 https://pypi.org/project/flake8-class-constants/ |
pep8
implies that constants are named inUPPER_CASE
: https://www.python.org/dev/peps/pep-0008/#constantsRight now this code is considered valid:
However, it is not valid. This one is:
pylint
has checks for it:C: 8, 0: Constant name "delta" doesn't conform to UPPER_CASE naming style (invalid-name)
The text was updated successfully, but these errors were encountered: