sphinx-autodoc-typehints icon indicating copy to clipboard operation
sphinx-autodoc-typehints copied to clipboard

Optional arguments - e.g. fun(var=None)

Open gitPrinz opened this issue 3 years ago • 2 comments

Parameters can be optional with a default value.

some_function(some_variable: some_type = default_value)

Is there any possibility to show this in the variable description?

For Example this could be solved

  • after the type hint by (some_type - default: default_value)
  • or as extra line below the description

gitPrinz avatar Apr 26 '21 14:04 gitPrinz

This has come up more than once, and I'll consider it. This project is not on my priority list, however, and I'm looking for a new maintainer so don't expect this to materialize soon.

agronholm avatar Apr 26 '21 14:04 agronholm

A PR for this would be welcome.

gaborbernat avatar Jan 08 '22 11:01 gaborbernat