Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module docstrings #8

Open
jdkandersson opened this issue Jan 7, 2023 · 4 comments
Open

Module docstrings #8

jdkandersson opened this issue Jan 7, 2023 · 4 comments

Comments

@jdkandersson
Copy link
Owner

jdkandersson commented Jan 7, 2023

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
Copy link
Owner Author

Maybe support abbreviation Funcs and Clss?

@jdkandersson
Copy link
Owner Author

jdkandersson commented Jan 7, 2023

And also support Consts abbreviation?

@jdkandersson
Copy link
Owner Author

jdkandersson commented Jan 7, 2023

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

@jdkandersson
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant