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

manually document enums #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

manually document enums #191

wants to merge 1 commit into from

Conversation

ojii
Copy link
Contributor

@ojii ojii commented Aug 15, 2024

Fixes #190

@dimaqq
Copy link
Contributor

dimaqq commented Nov 21, 2024

@ojii
Copy link
Contributor Author

ojii commented Nov 21, 2024

those docstrings look like they're the wrong way around (I'd expect them to be before the thing they document)

@dimaqq
Copy link
Contributor

dimaqq commented Nov 21, 2024

The convention was counter-intuitive for me too.

The way I force myself to remember this is:

  • after def foo() goes the function docstring
  • after attr: int goes the attribute docstring

@dimaqq
Copy link
Contributor

dimaqq commented Nov 21, 2024

Or you could use https://typing-extensions.readthedocs.io/en/latest/index.html#typing_extensions.Doc if the tooling groks that.

@ojii
Copy link
Contributor Author

ojii commented Nov 21, 2024

Or you could use https://typing-extensions.readthedocs.io/en/latest/index.html#typing_extensions.Doc if the tooling groks that.

I detest that use of type hints... I do a lot of fastapi these days and I find their doc-typehints to make the code super unreadable.

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

Successfully merging this pull request may close these issues.

autodocs for enums generate crazy output
2 participants