We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5fd819 commit 64cfb8dCopy full SHA for 64cfb8d
ipfshttpclient/utils.py
@@ -12,14 +12,16 @@
12
else:
13
ty_ext = ty
14
15
+T = ty.TypeVar("T")
16
+
17
if sys.version_info >= (3, 8): #PY38+
18
Literal = ty_ext.Literal
19
Protocol = ty_ext.Protocol
20
21
Literal_True = ty.Literal[True]
22
Literal_False = ty.Literal[False]
23
else: #PY37-
- class Literal(ty.Generic[ty.T]):
24
+ class Literal(ty.Generic[T]):
25
...
26
27
class Protocol:
@@ -240,4 +242,4 @@ def wrapper(*args: ty.Any, **kwargs: ty.Any) -> T:
240
242
"""
241
243
res = cmd(*args, **kwargs) # type: ty.Dict[str, T]
244
return res[self.field]
- return wrapper
245
+ return wrapper
0 commit comments