jdkandersson / flake8-docstrings-complete

Apache License 2.0
12 stars 2 forks source link

Module docstrings #8

Open jdkandersson opened 1 year ago

jdkandersson commented 1 year ago

Pep257 discusses documenting functions, classes and other objects exported from a module should be documented in the module docstring. Add a linter that checks this:

# module.py

"""...

Functions:
    foo: ...

Classes:
    FooClass: ...

Constants:
    FOO: ...
"""

FOO = ...

def foo(): ...

class FooClass: ...
jdkandersson commented 1 year ago

Maybe support abbreviation Funcs and Clss?

jdkandersson commented 1 year ago

And also support Consts abbreviation?

jdkandersson commented 1 year ago

Private constants, functions and classes would be optional, indicated by a leading _, although all that are documented should actually exist in the module.

jdkandersson commented 1 year ago

Documenting constants would also be optional since many constants's name could be enough documentation for them