Skip to content

Commit

Permalink
if versino check inside function
Browse files Browse the repository at this point in the history
  • Loading branch information
InvincibleRMC committed Jul 22, 2024
1 parent f351cdb commit 82ff3c2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mypy/test/teststubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,13 @@ class TestClass:

@unittest.skipIf(sys.version_info < (3, 12), "Inline Generics not supported before Python3.12")
def test_inline_generic_function(self) -> None:

if sys.version_info < (
3,
12,
): # Done to prevent mypy [attr-defined] error on __type_params__ in older versions of python
return

T = TypeVar("T", bound=int)

class TestClass:
Expand Down

0 comments on commit 82ff3c2

Please sign in to comment.