File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ overload = object()
1111Any = object ()
1212TypeVar = object ()
1313_promote = object ()
14- no_type_check = object ()
1514
1615class _SpecialForm (object ):
1716 def __getitem__ (self , typeargs : Any ) -> object : ...
@@ -36,6 +35,10 @@ class GenericMeta(type): ...
3635# distinguish the None type from the None value.
3736NoReturn = Union [None ]
3837
38+ _C = TypeVar ("_C" , bound = Callable [..., Any ])
39+ no_type_check = object ()
40+ def no_type_check_decorator (decorator : _C ) -> _C : ...
41+
3942# Type aliases and type constructors
4043
4144class TypeAlias :
@@ -69,7 +72,8 @@ _KT_co = TypeVar('_KT_co', covariant=True) # Key type covariant containers.
6972_VT_co = TypeVar ('_VT_co' , covariant = True ) # Value type covariant containers.
7073_T_contra = TypeVar ('_T_contra' , contravariant = True ) # Ditto contravariant.
7174_TC = TypeVar ('_TC' , bound = Type [object ])
72- _C = TypeVar ("_C" , bound = Callable [..., Any ])
75+ # _C is now declared earlier for no_type_check_decorator
76+ # _C = TypeVar("_C", bound=Callable[..., Any])
7377
7478def runtime_checkable (cls : _TC ) -> _TC : ...
7579
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ overload = object()
1212Any = object ()
1313TypeVar = object ()
1414_promote = object ()
15- no_type_check = object ()
1615
1716class _SpecialForm :
1817 def __getitem__ (self , typeargs : Any ) -> Any : ...
@@ -38,6 +37,10 @@ class GenericMeta(type): ...
3837# distinguish the None type from the None value.
3938NoReturn = Union [None ]
4039
40+ _C = TypeVar ("_C" , bound = Callable [..., Any ])
41+ no_type_check = object ()
42+ def no_type_check_decorator (decorator : _C ) -> _C : ...
43+
4144# Type aliases and type constructors
4245
4346class TypeAlias :
@@ -75,7 +78,8 @@ _KT_co = TypeVar('_KT_co', covariant=True) # Key type covariant containers.
7578_VT_co = TypeVar ('_VT_co' , covariant = True ) # Value type covariant containers.
7679_T_contra = TypeVar ('_T_contra' , contravariant = True ) # Ditto contravariant.
7780_TC = TypeVar ('_TC' , bound = Type [object ])
78- _C = TypeVar ("_C" , bound = Callable [..., Any ])
81+ # _C is now declared earlier for no_type_check_decorator
82+ # _C = TypeVar("_C", bound=Callable[..., Any])
7983
8084def runtime_checkable (cls : _TC ) -> _TC : ...
8185
You can’t perform that action at this time.
0 commit comments