-
- Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
pylint-dev/astroid
#2848Labels
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 implementationNeeds astroid updateNeeds an astroid update (probably a release too) before being mergableNeeds an astroid update (probably a release too) before being mergable
Description
Bug description
consider
from typing import ClassVar import attrs class X: A: ClassVar[int] = 1 def __init__(self) -> None: self.b: int = 2 @attrs.define class Y: A: ClassVar[int] = 1 b: int = 2I notice that with default settings, X.A is fine but Y.A gets an invalid-name lint. I think A is supposed to match on class-attribute-naming-style, which is any by default, but this appears to match attr-naming-style or something like it
Configuration
Command used
pylint --rcfile /dev/null --disable all --enable invalid-name x.pyPylint output
x.py:15:4: C0103: Attribute name "A" doesn't conform to snake_case naming style (invalid-name)Expected behavior
10/10 would lint again
Pylint version
pylint 3.3.7 astroid 3.3.11 Python 3.11.13OS / Environment
Debian
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 implementationNeeds astroid updateNeeds an astroid update (probably a release too) before being mergableNeeds an astroid update (probably a release too) before being mergable