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

Do not diagnose no-self-use or unused-argument for methods of structural types (protocols) #3002

Closed
thejohnfreeman opened this issue Jul 12, 2019 · 1 comment

Comments

@thejohnfreeman
Copy link

I searched, but didn't find any issue exactly like this. Nearest ones:

Considered making this a bug, but maybe it just falls under "haven't gotten around to it yet".

Steps to reproduce

import typing_extensions as tex

@tex.runtime
class Hasher(tex.Protocol):
    """A hashing algorithm, e.g. :func:`hashlib.sha256`."""
    def update(self, bs: bytes):
        ...
    def digest(self) -> bytes:
        ...

Current behavior

no-self-use and unused-argument diagnostics on the methods.

Expected behavior

No diagnostics.

pylint --version output

pylint 2.3.1
astroid 2.2.5
Python 3.6.8+ (heads/3.6:e5f9f4a, May  6 2019, 11:53:17)
[GCC 7.4.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