terrencepreilly / darglint

A python documentation linter which checks that the docstring description matches the definition.
MIT License
483 stars 41 forks source link

Ability to enforce package and module level docstrings #201

Open danhje opened 2 years ago

danhje commented 2 years ago

From PEP-257:

"The docstring for a module should generally list the classes, exceptions and functions (and any other objects) that are exported by the module, with a one-line summary of each. (These summaries generally give less detail than the summary line in the object’s docstring.) The docstring for a package (i.e., the docstring of the package’s init.py module) should also list the modules and subpackages exported by the package."

I would really appreciate the ability to enforce the existence of package- and module level docstrings. Checking these docstrings against the content of the package / module is not necessary for this feature to be useful.