Skip to content

manually document enums - #191

Open
ojii wants to merge 1 commit into
masterfrom
fix-enum-docs
Open

manually document enums#191
ojii wants to merge 1 commit into
masterfrom
fix-enum-docs

Conversation

@ojii

@ojii ojii commented Aug 15, 2024

Copy link
Copy Markdown
Contributor

Fixes #190

@dimaqq

dimaqq commented Nov 21, 2024

Copy link
Copy Markdown
Contributor

@ojii

ojii commented Nov 21, 2024

Copy link
Copy Markdown
Contributor Author

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

@dimaqq

dimaqq commented Nov 21, 2024

Copy link
Copy Markdown
Contributor

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

dimaqq commented Nov 21, 2024

Copy link
Copy Markdown
Contributor

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

@ojii

ojii commented Nov 21, 2024

Copy link
Copy Markdown
Contributor Author

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