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
autodoc add_module_names equivalent for arguments #9075
Comments
+1 for adding a new confval only for autodoc. It would be nice if we can give better name to it. I feel "add_module_names" is a bit ambiguous and difficult to understand its behavior from the name. |
To be clear, the |
Sorry for confuse. I know that. I thought it's better to separate the confval for autodoc and python-domain. |
Just FYI: Sphinx-4.0 provides a new configuration |
So does this mean that the proposed |
My understanding is that |
Oh that's a fair point! Yep. |
Also, not sure if this deserves a separate issue/feature request, but one more place where sphinx currently produces fully qualified names is in the package/module headings generated with
you will get the documentation for
instead of
The FQN version is kind of redundant, since the parent packages of |
…fied_typehints If autodoc_unqualified_typehints feature enabled, autodoc suppresses the leading module names of typehints of function signatures (ex. ``io.StringIO`` -> (`StringIO``)
…fied_typehints If autodoc_unqualified_typehints feature enabled, autodoc suppresses the leading module names of typehints of function signatures (ex. `io.StringIO` -> `StringIO`)
…fied_typehints If autodoc_unqualified_typehints feature enabled, autodoc suppresses the leading module names of typehints of function signatures (ex. `io.StringIO` -> `StringIO`)
Close #9075: autodoc: Add a config variable autodoc_unqualified_typehints
The default value of :confval:`autodoc_typehints_format` is changed to ``'smart'``. It will suppress the leading module names of typehints (ex. ``io.StringIO`` -> ``StringIO``). refs: sphinx-doc#9075
The default value of autodoc_typehints_format configuration is changed to `'smart'`. It will suppress the leading module names of typehints (ex. `io.StringIO` -> `StringIO`). refs: sphinx-doc#9075
The default value of autodoc_typehints_format configuration is changed to `'smart'`. It will suppress the leading module names of typehints (ex. `io.StringIO` -> `StringIO`). refs: sphinx-doc#9075
The
add_module_names = False
configuration seems to only affect the class/function/attribute header names.The type hints are still always rendered as fully qualified names.
mypackage/mymodule.py
:conf.py
:index.rst
:Expected documentation:
Actual documentation:
Describe the solution you'd like
I would be OK with any of the following:
Describe alternatives you've considered
There's a StackOverflow post which suggests using the
autodoc_docstring_signature
option to manually specify the function signature. This is not really a viable solution in my opinion.The text was updated successfully, but these errors were encountered: