pdoc3 / pdoc

:snake: :arrow_right: :scroll: Auto-generate API documentation for Python projects
https://pdoc3.github.io/pdoc/
GNU Affero General Public License v3.0
1.11k stars 143 forks source link

Feature/better enums #431

Closed JPHutchins closed 7 months ago

JPHutchins commented 7 months ago

Generally, Enums in python are used a bit differently than classes and IMO should be treated distinctly. Primarily, the "variables" should display what the enumeration corresponds to and they should not be sorted by default.

Here's a screenshot of how this PR formats a library I am working on:

image

This PR implements simple parsing for Enums. Initially, I subclassed Class. It ended up not really being necessary within the scope of this PR, but nevertheless could provide a nice place to extend functionality if necessary.

JPHutchins commented 7 months ago

https://github.com/mitmproxy/pdoc#pdoc-vs-pdoc3