Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pytype/tests/test_typevar1.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,16 @@ def f(x):
""")
self.assertErrorRegexes(errors, {"e": "Expected.*int.*Actual.*str"})

@test_utils.skipBeforePy((3, 12), "PEP 695 - 3.12 feature")
def test_global_var_not_hidden_by_type_variable(self):
self.Check("""
Apple: str = 'Apple'
type AppleBox[Apple] = tuple[Apple, ...]
def print_apple(a: str):
print(a)
print_apple(Apple)
""")


if __name__ == "__main__":
test_base.main()
Loading