-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
False positive: invalid-name for UPPER_CASE Enum values #4149
Comments
+1 on this one, but for from dataclasses import dataclass
from typing import ClassVar
@dataclass
class Foo:
BAR: ClassVar[int] = 42 pylint path/to/show_bug.py
************* Module show_bug
path/to/show_bug.py:6:4: C0103: Attribute name "BAR" doesn't conform to snake_case naming style (invalid-name) Output of
|
@iFreilicht I might be missing something, but I can't reproduce the issue. It works as intended (no issues raised) for me.
@jamesbraza Please open a new issue for it, so we can track it properly. I would think the |
Okay @cdce8p I opened a new issue: #4154 Also, I also can't reproduce @iFreilicht 's bug (I just tried it as well). |
Ha, so the issue was indeed my The real issue is; a value of Should I update the original issue description? Here's a minimal
|
@iFreilicht Probably not necessary anymore. I've opened a MR to address it: #4162 |
Steps to reproduce
Given a file
a.py
:Then run:
This is of course optional, I just did it to make sure my local .pylintrc wasn't the root of the problem.
Current behavior
Result of
pylint --rcfile=testrc a.py
:But, changing the file so the names are snake_case will result in the opposite error:
Expected behavior
I would expect this to not return any errors.
pylint --version output
Result of
pylint --version
output:The text was updated successfully, but these errors were encountered: