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

sphinx.util.typing.stringify duplicates type arguments #7567

Closed
eric-wieser opened this issue Apr 27, 2020 · 1 comment
Closed

sphinx.util.typing.stringify duplicates type arguments #7567

eric-wieser opened this issue Apr 27, 2020 · 1 comment

Comments

@eric-wieser
Copy link
Contributor

eric-wieser commented Apr 27, 2020

Describe the bug
Foo[int] is shown as Foo[int][int]

To Reproduce
Steps to reproduce the behavior:

In [6]: from typing import Generic, TypeVar

In [7]: T = TypeVar('T')

In [8]: class Foo(Generic[T]): pass

In [11]: sphinx.util.typing.stringify(Foo[int])
Out[11]: '__main__.Foo[int][int]'

Expected behavior
The output should be __main__.Foo[int]

Environment info

  • OS: Windows 10
  • Python version: 3.8.0
  • Sphinx version: 3.0.2
@tk0miya tk0miya self-assigned this Apr 27, 2020
@eric-wieser
Copy link
Contributor Author

eric-wieser commented Apr 27, 2020

@tk0miya, I just assembed a patch for this.

tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 27, 2020
eric-wieser added a commit to eric-wieser/sphinx that referenced this issue Apr 27, 2020
eric-wieser added a commit to eric-wieser/sphinx that referenced this issue Apr 27, 2020
eric-wieser added a commit to eric-wieser/sphinx that referenced this issue Apr 27, 2020
@tk0miya tk0miya closed this as completed Apr 27, 2020
@tk0miya tk0miya added this to the 3.0.4 milestone Apr 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 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

2 participants