-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Enhancement ✨Improvement to a componentImprovement to a componentHacktoberfestHigh priorityIssue with more than 10 reactionsIssue with more than 10 reactionsNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Description
do not report too-few-public-methods for attr.s, attr.dataclass, typing.NamedTuple and similar.
example:
import attr
@attr.dataclass(frozen=True) # pylint-ignore: too-few-public-methods
class Foo:
ham: str
spam: str@uriva As mentioned by @matkoniecz in most cases the check makes sense. If your class has a single method on it, it's probably a function in disguise. You can also configure the number of public methods with min-public-methods. But there are a couple of classes for which we should not report this, as it makes perfect sense to not have too many methods or no methods at all. This includes
attrs,dataclasses,typing.NamedTupleand similar.
Originally posted by @PCManticore in #2710 (comment)
hatzel, thesofakillers, NeilGirdhar, frederikaalund, graingert and 11 more
Metadata
Metadata
Assignees
Labels
Enhancement ✨Improvement to a componentImprovement to a componentHacktoberfestHigh priorityIssue with more than 10 reactionsIssue with more than 10 reactionsNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation