29
29
from contextlib import redirect_stderr , redirect_stdout
30
30
from functools import singledispatch
31
31
from pathlib import Path
32
- from typing import Any , Generic , TypeVar , Union
32
+ from typing import Any , Final , Generic , TypeVar , Union
33
33
from typing_extensions import get_origin , is_typeddict
34
34
35
35
import mypy .build
@@ -52,7 +52,7 @@ def __repr__(self) -> str:
52
52
return "MISSING"
53
53
54
54
55
- MISSING : typing_extensions . Final = Missing ()
55
+ MISSING : Final = Missing ()
56
56
57
57
T = TypeVar ("T" )
58
58
MaybeMissing : typing_extensions .TypeAlias = Union [T , Missing ]
@@ -65,10 +65,10 @@ def __repr__(self) -> str:
65
65
return "<unrepresentable>"
66
66
67
67
68
- UNREPRESENTABLE : typing_extensions . Final = Unrepresentable ()
68
+ UNREPRESENTABLE : Final = Unrepresentable ()
69
69
70
70
71
- _formatter : typing_extensions . Final = FancyFormatter (sys .stdout , sys .stderr , False )
71
+ _formatter : Final = FancyFormatter (sys .stdout , sys .stderr , False )
72
72
73
73
74
74
def _style (message : str , ** kwargs : Any ) -> str :
@@ -1447,7 +1447,7 @@ def verify_typealias(
1447
1447
# ====================
1448
1448
1449
1449
1450
- IGNORED_MODULE_DUNDERS : typing_extensions . Final = frozenset (
1450
+ IGNORED_MODULE_DUNDERS : Final = frozenset (
1451
1451
{
1452
1452
"__file__" ,
1453
1453
"__doc__" ,
@@ -1469,7 +1469,7 @@ def verify_typealias(
1469
1469
}
1470
1470
)
1471
1471
1472
- IGNORABLE_CLASS_DUNDERS : typing_extensions . Final = frozenset (
1472
+ IGNORABLE_CLASS_DUNDERS : Final = frozenset (
1473
1473
{
1474
1474
# Special attributes
1475
1475
"__dict__" ,
@@ -1915,9 +1915,7 @@ class _Arguments:
1915
1915
1916
1916
1917
1917
# typeshed added a stub for __main__, but that causes stubtest to check itself
1918
- ANNOYING_STDLIB_MODULES : typing_extensions .Final = frozenset (
1919
- {"antigravity" , "this" , "__main__" , "_ios_support" }
1920
- )
1918
+ ANNOYING_STDLIB_MODULES : Final = frozenset ({"antigravity" , "this" , "__main__" , "_ios_support" })
1921
1919
1922
1920
1923
1921
def test_stubs (args : _Arguments , use_builtins_fixtures : bool = False ) -> int :
0 commit comments