You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromenumimportEnum# StrEnum for python >= 3.12 fromnbdevimportshow_docclassColors(str, Enum): # Or `StrEnum` if on python >= 3.12"Enum with the valid colors we can use in our package"RED="red"GREEN="green"BLUE="blue"show_doc(Colors)
Issue description
This it not really a bug, more like a feature request. When defining thin classes, such as enums or dataclasses, the documentation for those classes shows a very uninformative ClassName (*values).
For this use case, it would be really useful to have an option that would allow inlining the entire class source in the docs, to get a view of all the possible values. To avoid breaking existing code this could be implemented as an optional argument to the show_doc method, so to enable this one would do something like show_doc(Colors, full_source=True)
The text was updated successfully, but these errors were encountered:
Minimally reproducible example:
Issue description
This it not really a bug, more like a feature request. When defining thin classes, such as enums or dataclasses, the documentation for those classes shows a very uninformative
ClassName (*values)
.For this use case, it would be really useful to have an option that would allow inlining the entire class source in the docs, to get a view of all the possible values. To avoid breaking existing code this could be implemented as an optional argument to the
show_doc
method, so to enable this one would do something likeshow_doc(Colors, full_source=True)
The text was updated successfully, but these errors were encountered: