Skip to content
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

Close #9075: autodoc: Add a config variable autodoc_unqualified_typehints #9931

Merged
merged 4 commits into from
Dec 11, 2021

Commits on Nov 29, 2021

  1. py domain: Allow "~" prefix as a prefix of typehints in signature

    Now python domain supports the "~" prefix at the beginning of the
    typehints of the function signatures:
    
      .. py:function:: func(x: ~typing.Dict)
    
    It's rescognized as the same as python reference roles do
    (ex. :py:class:`~typing.Dict`).
    tk0miya committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    5eaed2b View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2021

  1. Add smartref parameter to sphinx.util.typing:stringify()

    To make the generated function signatures simple, this adds a new
    parameter `smartref` to sphinx.util.typing:stringify() to suppress the
    leading module name from typehints.
    tk0miya committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    80f79ae View commit details
    Browse the repository at this point in the history
  2. Add unqualified_typehints parameter to stringify_signature()

    To make the generated function signatures simple, this adds a new
    parameter `unqualified_typehints` to sphinx.util.inspect:
    stringify_signature() to suppress the leading module name of
    typehints.
    tk0miya committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    5aa6cbb View commit details
    Browse the repository at this point in the history
  3. Close sphinx-doc#9075: autodoc: Add a config variable autodoc_unquali…

    …fied_typehints
    
    If autodoc_unqualified_typehints feature enabled, autodoc suppresses the
    leading module names of typehints of function signatures (ex.
    `io.StringIO` -> `StringIO`)
    tk0miya committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    c71ff1c View commit details
    Browse the repository at this point in the history