manually document enums
Fixes #190
WDYT about this idiom for documenting enum values?
https://github.com/canonical/operator/blob/6a17bf933114959a968fe65502f429a0dab4452c/ops/charm.py#L1815-L1822
those docstrings look like they're the wrong way around (I'd expect them to be before the thing they document)
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: intgoes the attribute docstring
Or you could use https://typing-extensions.readthedocs.io/en/latest/index.html#typing_extensions.Doc if the tooling groks that.
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.