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

F811 redefinition of unused incorrectly triggered for __class__ #372

Open
euresti opened this issue Oct 18, 2018 · 0 comments
Open

F811 redefinition of unused incorrectly triggered for __class__ #372

euresti opened this issue Oct 18, 2018 · 0 comments

Comments

@euresti
Copy link

euresti commented Oct 18, 2018

class A:
    @property
    def __class__(self):
        return int

    @__class__.setter
    def __class__(self, __type):
        raise NotImplementedError()

    @property
    def blah(self):
        return int

    @blah.setter
    def blah(self, __type):
        raise NotImplementedError()

This fails like this:

$ pyflakes foo.py 
foo.py:6: redefinition of unused '__class__' from line 2

I included a 2nd property definition to show that it wasn't happening normally. (Seems to be a special situation for __class__

$ pyflakes --version
2.0.0
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