Open jtpavlock opened 4 years ago
I don't actually maintain pydocstyle so take what I say with a grain of salt.
I think this might not be entirely tenable to do. Most attributes are created in __init__
but many __init__
methods aren't so simple as your example. This would require some amount of branch analysis, etc. Alternatively, instantiating the class would need to happen in order to find public attributes etc. Some attributes are publicly declared in other ways too, e.g.,
class AnotherClass:
hates_spam = True
# Alternatively
import attr
@attr.s
class YetAnotherClass:
hates_spam = attr.ib(default=True)
So this would have to be able to take all of those into account. It's not impossible, but it's also not trivial
This is a feature request to add a check for class level attribute documentation.
As described in the google style guide: