Skip to content

Commit

Permalink
Don't use Mapping for mutable dicts
Browse files Browse the repository at this point in the history
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 <mvrachev@vmware.com>
  • Loading branch information
MVrachev committed May 11, 2021
1 parent 10a8faa commit 8519016
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tuf/api/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ def __init__(
self.unrecognized_fields = unrecognized_fields or {}

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

0 comments on commit 8519016

Please sign in to comment.