2929from contextlib import redirect_stderr , redirect_stdout
3030from functools import singledispatch
3131from pathlib import Path
32- from typing import AbstractSet , Any , Generic , TypeVar , Union
32+ from typing import AbstractSet , Any , Final , Generic , TypeVar , Union
3333from typing_extensions import get_origin , is_typeddict
3434
3535import mypy .build
@@ -52,7 +52,7 @@ def __repr__(self) -> str:
5252 return "MISSING"
5353
5454
55- MISSING : typing_extensions . Final = Missing ()
55+ MISSING : Final = Missing ()
5656
5757T = TypeVar ("T" )
5858MaybeMissing : typing_extensions .TypeAlias = Union [T , Missing ]
@@ -65,10 +65,10 @@ def __repr__(self) -> str:
6565 return "<unrepresentable>"
6666
6767
68- UNREPRESENTABLE : typing_extensions . Final = Unrepresentable ()
68+ UNREPRESENTABLE : Final = Unrepresentable ()
6969
7070
71- _formatter : typing_extensions . Final = FancyFormatter (sys .stdout , sys .stderr , False )
71+ _formatter : Final = FancyFormatter (sys .stdout , sys .stderr , False )
7272
7373
7474def _style (message : str , ** kwargs : Any ) -> str :
@@ -1447,7 +1447,7 @@ def verify_typealias(
14471447# ====================
14481448
14491449
1450- IGNORED_MODULE_DUNDERS : typing_extensions . Final = frozenset (
1450+ IGNORED_MODULE_DUNDERS : Final = frozenset (
14511451 {
14521452 "__file__" ,
14531453 "__doc__" ,
@@ -1469,7 +1469,7 @@ def verify_typealias(
14691469 }
14701470)
14711471
1472- IGNORABLE_CLASS_DUNDERS : typing_extensions . Final = frozenset (
1472+ IGNORABLE_CLASS_DUNDERS : Final = frozenset (
14731473 {
14741474 # Special attributes
14751475 "__dict__" ,
@@ -1915,9 +1915,7 @@ class _Arguments:
19151915
19161916
19171917# 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" })
19211919
19221920
19231921def test_stubs (args : _Arguments , use_builtins_fixtures : bool = False ) -> int :
0 commit comments