Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F3938694
raw.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
vlorentz
Jul 3 2020, 4:14 PM
2020-07-03 16:14:05 (UTC+2)
Size
868 B
Subscribers
None
raw.txt
View Options
KT = TypeVar("KT")
VT = TypeVar("VT")
def freeze_optional_dict(
d: Union[None, Dict[KT, VT], ImmutableDict[KT, VT]]
# ^swh/model/model.py:49: error: Type variable "swh.model.model.KT" is unbound
# swh/model/model.py:49: note: (Hint: Use "Generic[KT]" or "Protocol[KT]" base class to bind "KT" inside a class)
# swh/model/model.py:49: note: (Hint: Use "KT" in function signature to bind "KT" inside a function)
# swh/model/model.py:49: error: Type variable "swh.model.model.VT" is unbound
# swh/model/model.py:49: note: (Hint: Use "Generic[VT]" or "Protocol[VT]" base class to bind "VT" inside a class)
# swh/model/model.py:49: note: (Hint: Use "VT" in function signature to bind "VT" inside a function)
) -> Optional[ImmutableDict[KT, VT]]:
if isinstance(d, dict):
return ImmutableDict(d)
else:
return d
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
983047
Attached To
P714 unbound type variables
Event Timeline
Log In to Comment