Skip to content

Commit

Permalink
add enable
Browse files Browse the repository at this point in the history
  • Loading branch information
InvincibleRMC committed Jul 23, 2024
1 parent 0bd3c1e commit 23c1a30
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mypy/test/teststubgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import tempfile
import unittest
from types import ModuleType
from typing import Any, Tuple, TypeVar, cast, no_type_check
from typing import Any, Tuple, TypeVar, cast
from typing_extensions import ParamSpec, TypeVarTuple

import pytest
Expand Down Expand Up @@ -944,10 +944,9 @@ class TestClass:
gen.generate_class_stub("C", TestClass, output)
assert_equal(output, ["class C[T]: ..."])

# type: ignore used for older versions of python type checking inline generics.
@no_type_check
@unittest.skipIf(sys.version_info < (3, 12), "Inline Generics not supported before Python3.12")
def test_generic_class(self) -> None:
# mypy: enable-incomplete-feature=NewGenericSyntax
exec("class Test[A]: ...")

class TestClass[A]: ...
Expand Down

0 comments on commit 23c1a30

Please sign in to comment.