File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11
11
else :
12
12
ty_ext = ty
13
13
14
+ T = ty .TypeVar ("T" )
15
+
14
16
if sys .version_info >= (3 , 8 ): #PY38+
15
17
Literal = ty_ext .Literal
16
18
Protocol = ty_ext .Protocol
17
19
18
20
Literal_True = ty .Literal [True ]
19
21
Literal_False = ty .Literal [False ]
20
22
else : #PY37-
21
- class Literal (ty .Generic [ty . T ]):
23
+ class Literal (ty .Generic [T ]):
22
24
...
23
25
24
26
class Protocol :
@@ -172,7 +174,6 @@ def clean_files(files: ty.Union[clean_file_t, ty.Iterable[clean_file_t]]) \
172
174
yield clean_file (ty .cast (clean_file_t , files ))
173
175
174
176
175
- T = ty .TypeVar ("T" )
176
177
F = ty .TypeVar ("F" , bound = ty .Callable [..., ty .Dict [str , ty .Any ]])
177
178
178
179
@@ -211,4 +212,4 @@ def wrapper(*args: ty.Any, **kwargs: ty.Any) -> T:
211
212
"""
212
213
res = cmd (* args , ** kwargs ) # type: ty.Dict[str, T]
213
214
return res [self .field ]
214
- return wrapper
215
+ return wrapper
You can’t perform that action at this time.
0 commit comments