-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 report too-few-public-methods for attr.s
, attr.dataclass
, typing.NamedTuple
and similar.
#3732
Comments
I'm not sure why this reopened, I am no longer using pylint (moved to flake8) so no interest in this anymore. |
I am also not sure why you copied the comment outright pinging all involved rather than posting only relevant part. Posting "I'm going to close this issue" while opening an issue is bizarre. Also: give a code sample wrongly reported as mistake. |
@matkoniecz comment now quoted, code example added |
I just hit the "reference in new issue button" |
This message is probably going to be disabled by default because there is a lot of example of place where it makes sense to have few public method (Django Meta class, inheritance of class that implements a run() function etc.) See #3512 . If you think this is useful and want to use it, but with a whitelist of class that can have few public method, I don't think there is an easy way to do that right now, but I think this is doable. |
Configurable suppressions for classes would be generally useful: Simple config override in .pylintrc for classes that: # [CLASSRULES.<CUSTOM_NAME>] Would solve a lot of these issues. |
This is false positive, pylint-dev/pylint#3732
This is false positive, pylint-dev/pylint#3732
Also true for exceptions see : #4464 |
Also true for anything inheriting from typing.Protocol. |
@Pierre-Sassoulas why was this unpinned? |
this should also not report: |
I unpinned it because there was more pressing issues to advertise first (ranked according to number of thumbsup or heart reactions), it does not mean that I would not review a fix for this ;) |
What about context managers? May pylint detect them by |
If this is still for consideration, attrs now support an |
do not report too-few-public-methods for
attr.s
,attr.dataclass
,typing.NamedTuple
and similar.example:
Originally posted by @PCManticore in #2710 (comment)
The text was updated successfully, but these errors were encountered: