E590
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ab8b1e commit d916974Copy full SHA for d916974
Lib/test/test_type_params.py
@@ -240,11 +240,10 @@ class ClassA[T](Generic[T]): ...
240
exec(code, {})
241
242
def test_traditional_02(self):
243
- # This does not generate a runtime error, but it should be
244
- # flagged as an error by type checkers.
245
from typing import TypeVar
246
S = TypeVar("S")
247
- class ClassA[T](dict[T, S]): ...
+ with self.assertRaises(TypeError):
+ class ClassA[T](dict[T, S]): ...
248
249
def test_traditional_03(self):
250
# This does not generate a runtime error, but it should be
0 commit comments