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

Bug pylint 3885 #3894

Merged
merged 6 commits into from
Oct 24, 2020
Merged

Bug pylint 3885 #3894

merged 6 commits into from
Oct 24, 2020

Conversation

hippo91
Copy link
Contributor

@hippo91 hippo91 commented Oct 11, 2020

Steps

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a ChangeLog entry describing what your PR does.
  • Write a good description on what the PR does.

Description

This PR deactivates no-self-use and unused-argument message emission for class inheriting from typing.Protocol[T].
It just checks if the qualified name of the inherited class is .Protocol, thus false negative for dynamically created class named Protocol may arise but i think it is a rare situation.

Type of Changes

Type
🐛 Bug fix

Related Issue

Closes #3885

@coveralls
Copy link

coveralls commented Oct 11, 2020

Coverage Status

Coverage remained the same at 90.838% when pulling ee15027 on hippo91:bug_pylint_3885 into acf39ac on PyCQA:master.

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean change, and we do need to get rid of those false positive :)

@hippo91 hippo91 merged commit fed4438 into pylint-dev:master Oct 24, 2020
@hippo91 hippo91 deleted the bug_pylint_3885 branch October 24, 2020 09:50
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

Successfully merging this pull request may close these issues.

Do not diagnose no-self-use or unused-argument for methods of generic structural types (Protocol[T])
3 participants