Skip to content

manually document enums#191

Open
ojii wants to merge 1 commit intomasterfrom
fix-enum-docs
Open

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

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