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

Fix #7567: autodoc: parametrized types are shown twice for generic types #7568

Closed
wants to merge 1 commit into from

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Apr 27, 2020

Feature or Bugfix

  • Bugfix

Purpose

@eric-wieser
Copy link
Contributor

Duplicates gh-7569, but your fix looks different to mine

@@ -93,6 +93,9 @@ def _stringify_py37(annotation: Any) -> str:
return stringify(annotation.__args__[0])
elif annotation._special:
return qualname
elif issubclass(annotation.__origin__, Generic): # type: ignore
# subclasses of Generic already contains the types for elements in its name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this fails my testcase.

assert stringify(MyList[Tuple[int, int]]) == "test_util_typing.MyList[Tuple[int, int]]"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks,

@tk0miya tk0miya closed this Apr 27, 2020
@tk0miya tk0miya deleted the 7567_generic_types branch April 27, 2020 14:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants