Skip to content

Commit

Permalink
Fix type annotation with two string literals (#1853)
Browse files Browse the repository at this point in the history
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
Glyphack and JelleZijlstra committed Sep 3, 2024
1 parent 618dbc3 commit f816a64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conformance/tests/annotations_forward_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ClassA:
# The following should all generate errors because they are not legal type
# expressions, despite being enclosed in quotes.
def invalid_annotations(
p1: "eval(" ".join(map(chr, [105, 110, 116])))", # E
p1: "eval(''.join(map(chr, [105, 110, 116])))", # E
p2: "[int, str]", # E
p3: "(int, str)", # E
p4: "[int for i in range(1)]", # E
Expand Down

0 comments on commit f816a64

Please sign in to comment.