-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
type:enhancementenhance or introduce a new featureenhance or introduce a new feature
Milestone
Description
Is your feature request related to a problem? Please describe.
If I use typehints like this, I get the same result as expected from the documentation.
in code:
def func(value: int | str)
passin documentation:
value (int | str) - description about value.
But adding None converts it to a hard-to-read form.
in code:
def func(value: int | str | None = None)
passin documentation:
value (Optional[Union[int, str]]) - description about value.
I think the output should look like this.
value (int | str | None) - description about value.
Does Sphinx already have these features? If not, it would be nice if Sphinx implemented such a feature.
Metadata
Metadata
Assignees
Labels
type:enhancementenhance or introduce a new featureenhance or introduce a new feature