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

autodoc_typehints does not effect to overloaded callables #7785

Closed
tk0miya opened this issue Jun 4, 2020 · 1 comment
Closed

autodoc_typehints does not effect to overloaded callables #7785

tk0miya opened this issue Jun 4, 2020 · 1 comment

Comments

@tk0miya
Copy link
Member

tk0miya commented Jun 4, 2020

Describe the bug
autodoc_typehints does not effect to overloaded callables.

To Reproduce

# in conf.py
autodoc_typehints = 'none'
# in index.rst
.. automodule:: example
   :members:
   :undoc-members:
# in example.py
from typing import overload


@overload
def foo(x: int) -> int:
    ...


@overload
def foo(x: float) -> float:
    ...


def foo(x):
    return x

Expected behavior
All typehints for overloaded callables are obeyed autodoc_typehints setting.

Your project
No

Screenshots
No

Environment info

  • OS: Mac
  • Python version: 3.8.2
  • Sphinx version: 3.1.0dev
  • Sphinx extensions: sphinx.ext.autodoc
  • Extra tools: No

Additional context
No

@tk0miya
Copy link
Member Author

tk0miya commented Oct 4, 2020

I posted a PR #8282 to support the case of autodoc_typehints='none'. But additional works are still needed for the case of autodoc_typehints='description'.

@tk0miya tk0miya modified the milestones: 3.3.0, 3.4.0 Oct 4, 2020
tk0miya added a commit that referenced this issue Oct 28, 2020
…_overloads

Fix #7785: autodoc_typehints=none does not effect to overloads
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant