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 #8099: autodoc: NameError is raised when script uses TYPE_CHECKING #8108

Merged
merged 2 commits into from
Aug 14, 2020

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Aug 12, 2020

Feature or Bugfix

  • Bugfix

Purpose

…PE_CHECKING

`typing.get_type_hints()` raises NameError when the target object
contains unresolavable type annotation (ex. TYPE_CHECKING).  This
handles the exception and use unresolved annotations for type hints.
@tk0miya tk0miya force-pushed the 8099_NameError_for_TYPE_CHECKING branch from 53b17f2 to 611fff9 Compare August 13, 2020 13:57
@tk0miya tk0miya merged commit 5d70682 into sphinx-doc:3.2.x Aug 14, 2020
@tk0miya tk0miya deleted the 8099_NameError_for_TYPE_CHECKING branch August 14, 2020 05:56
@rudolfbyker
Copy link

Is there any way to get resolved annotations with TYPE_CHECKING?

@tk0miya
Copy link
Member Author

tk0miya commented Jul 4, 2021

Please post your super cool patch!

@rudolfbyker
Copy link

Is that another way of saying "No, but we could if you implemented it"? If not, I don't understand your last message.

@tk0miya
Copy link
Member Author

tk0miya commented Jul 4, 2021

Yes. I don't have the knowledge to implement it. So somebody's help is needed to realize it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 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.

2 participants