-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Expand variable
name type to include non-constant, module-level variables
#4606
Comments
The fix is "easy", I have something locally. But there would be false positive as soon as pylint make a mistake on the inference of a constant. Also it broke 53 tests in the test suite most of them functional, For example:
Or :
I use constant that are mutable sometime, and variable that are immutable. So I don't know, about this one. Maybe a test that this is |
Checking for either |
Closing as a duplicate of #3585 |
Is your feature request related to a problem? Please describe
Naming style of module-level non-constant variables is not enforced. For example,
My best guess for the reason is that non-constant module-level variables do not fall into any name type. Prior to pylint 2.5.0 they counted as
const
. This was fixed in 3422e4a, but now there are no naming style checks at all for these variables.Describe the solution you'd like
Expand the
variable
name type to include non-constant module-level variables. Alternatively, define a new name type specifically for non-constant, module-level variables.Additional context
The text was updated successfully, but these errors were encountered: