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 ~Literal references #10511

Merged
merged 1 commit into from Jun 6, 2022
Merged

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Jun 2, 2022

Fixes #10497

@tk0miya sorry for last minute

Feature or Bugfix

  • Bugfix

A

@AA-Turner AA-Turner mentioned this pull request Jun 2, 2022
@AA-Turner AA-Turner added this to the 5.0.2 milestone Jun 2, 2022
@tk0miya tk0miya merged commit 8eeaa98 into sphinx-doc:5.0.x Jun 6, 2022
tk0miya added a commit that referenced this pull request Jun 6, 2022
@AA-Turner
Copy link
Member Author

@tk0miya -- should line 186 also be updated for ~typing.Literal? I haven't debugged locally, but it is the only other occurance of the string typing.Literal in the module.

https://github.com/sphinx-doc/sphinx/blob/5.0.x/sphinx/domains/python.py#L186

A

@tk0miya
Copy link
Member

tk0miya commented Jun 6, 2022

No, you don't need it. In AST level, the ~ prefix is separated to an independent node ast.Invert. So it will never take ~typing.Literal value.

@AA-Turner AA-Turner deleted the fix-tilde-literals branch June 16, 2022 22:22
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2022
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