Skip to content
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 F811 Redfinition on class member if global variable with same name is unused. #13930

Open
Daraan opened this issue Oct 25, 2024 · 0 comments

Comments

@Daraan
Copy link

Daraan commented Oct 25, 2024

Version: 0.7.1

In the following code snippet the class member is marked as redefinition

https://play.ruff.rs/ce10f9c6-0895-4146-932c-89c3aea05159

from queue import Empty

class Types:
    INVALID = 0
    UINT = 1
    HEX = 2
    Empty = 3  # <-- reported as redefinition

# q = Empty() <- this disables the error, if uncommented
@Daraan Daraan changed the title False Positive F811 Redfinition on class member False Positive F811 Redfinition on class member if global variable with same name is unused. Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant