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

Support per-enum-value comments #62

Open
brandon-leapyear opened this issue Apr 14, 2022 · 1 comment
Open

Support per-enum-value comments #62

brandon-leapyear opened this issue Apr 14, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request stale

Comments

@brandon-leapyear
Copy link

brandon-leapyear commented Apr 14, 2022

Description

sphinx-autodoc supports the use of #: comments to document class attributes (ref). It would be great to have the same support in enum_tools

e.g.

class MyEnum(Enum):
    #: This is an A value
    A = auto()

    #: This is another value
    B = auto()

Version

  • Operating System:
  • Python:
  • enum_tools:

Other Additional Information:

@1kastner
Copy link
Contributor

It is already implemented as long as you use the decorator document_enum, see https://enum-tools.readthedocs.io/en/latest/api/documentation.html#enum_tools.documentation.document_enum.

This, however, adds this library as a runtime dependency to your project. That is not beautiful but currently up to my knowledge not avoidable.

@stale stale bot added the stale label Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

3 participants