Skip to content

Commit 198025b

Browse files
committed
Don't use Mapping for mutable dicts
Stop using Mapping where we actually mean Dict: Mapping means "we only need a read-only dict" and most of the time this is not really the case. Signed-off-by: Martin Vrachev <[email protected]>
1 parent 10a8faa commit 198025b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tuf/api/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ def __init__(
838838
self.unrecognized_fields = unrecognized_fields or {}
839839

840840
@classmethod
841-
def from_dict(cls, delegations_dict: Mapping[str, Any]) -> "Delegations":
841+
def from_dict(cls, delegations_dict: Dict[str, Any]) -> "Delegations":
842842
"""Creates Delegations object from its dict representation."""
843843
keys = delegations_dict.pop("keys")
844844
keys_res = {}

0 commit comments

Comments
 (0)