Skip to content

Commit

Permalink
add mypy guard
Browse files Browse the repository at this point in the history
  • Loading branch information
InvincibleRMC committed Jul 23, 2024
1 parent b4e40b5 commit e5ef50a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mypy/test/teststubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,12 @@ class TestClass:

@unittest.skipIf(sys.version_info < (3, 12), "Inline Generics not supported before Python3.12")
def test_generic_class(self) -> None:
if sys.version_info < (
3,
12,
): # Done to prevent mypy [syntax] error on inline Generics in older versions of python
return

exec("class Test[A]: ...")

class TestClass[A]: ...
Expand Down

0 comments on commit e5ef50a

Please sign in to comment.