File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -1899,16 +1899,17 @@ def _proto_hook(other):
1899
1899
if cls .__init__ is Protocol .__init__ :
1900
1900
cls .__init__ = _no_init_or_replace_init
1901
1901
1902
- def _dummy [T , * Ts , ** P ]():
1902
+ class _Dummy [T , * Ts , ** P ]():
1903
1903
pass
1904
1904
1905
- TypeVar = type (_dummy .__type_variables__ [0 ])
1906
- TypeVarTuple = type (_dummy .__type_variables__ [1 ])
1907
- ParamSpec = type (_dummy .__type_variables__ [2 ])
1905
+ TypeVar = type (_Dummy .__type_variables__ [0 ])
1906
+ TypeVarTuple = type (_Dummy .__type_variables__ [1 ])
1907
+ ParamSpec = type (_Dummy .__type_variables__ [2 ])
1908
1908
ParamSpecArgs = type (ParamSpec ("P" ).args )
1909
1909
ParamSpecKwargs = type (ParamSpec ("P" ).kwargs )
1910
+ Generic = _Dummy .__mro__ [1 ]
1910
1911
1911
- del _dummy
1912
+ del _Dummy
1912
1913
1913
1914
def _pickle_psargs (psargs ):
1914
1915
return ParamSpecArgs , (psargs .__origin__ ,)
You can’t perform that action at this time.
0 commit comments