-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix function containing PEP 593 Annotated with a string literal secon…
…d arg causing 'Name "x" is not defined" error (#10777) Fixes #9868 When analyzing function definitions, mypy attempts to infer type variables. The code which did that also tried to look into the second type arg to `Annotated`, which, if a string literal, resulted in a lookup which may cause a 'Name "x" is not defined" error. Co-authored-by: 97littleleaf11 <97littleleaf11@users.noreply.github.com> Co-authored-by: Jingchen Ye <97littleleaf11@gmail.com>
- Loading branch information
1 parent
eea4c76
commit 40b6b9b
Showing
2 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters