This is a feature request to add a check for class level attribute documentation.
As described in the google style guide:
If your class has public attributes, they should be documented here in an Attributes section and follow the same formatting as a function鈥檚 Args section.
class SampleClass:
"""Summary of class here.
Longer class information....
Longer class information....
Attributes:
likes_spam: A boolean indicating if we like SPAM or not.
eggs: An integer count of the eggs we have laid.
"""
def __init__(self, likes_spam=False):
"""Inits SampleClass with blah."""
self.likes_spam = likes_spam
self.eggs = 0
def public_method(self):
"""Performs operation blah."""
this doesn't really fit with pycodestyle (which is mostly about whitespace issues) -- perhaps pydocstyle is a better place?
Wow, I totally meant to post this there. Sorry! It's been a long day...
I swear, Guido threatening his lawsuit over using pep* names has confused me endlessly with the new package names
Most helpful comment
Wow, I totally meant to post this there. Sorry! It's been a long day...