pydoclint
pydoclint copied to clipboard
Allow documentation of dunder methods
For a class I may have a dunder method (e.g. __contains__ or __exit__) where I may have some non-trivial behaviour that needs documenting. The tool currently does not check this as far as I can tell.
I think pydoclint already can check this.
I used pydoclint 0.7.5 on this code example:
class MyClass(object):
def __contains__(self, item: int) -> bool:
"""
Contains something
Args:
item (int2): The item
Returns:
bool: the return value
"""
pass
And I got the following violation, as expected:
['DOC105: Method `MyClass.__contains__`: Argument names match, but type hints '
'in these args do not match: item']
Closing this issue, since it appears pydoclint already handles this.