From 98c6f437279ed768d3334cf601e5df881406d5b1 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Mon, 17 May 2021 19:02:23 +0300 Subject: [PATCH] Metadata API: Fix DelegatedRole.from_dict() return type Also mark the argument as Dict as we will pop() it. Signed-off-by: Jussi Kukkonen --- tuf/api/metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuf/api/metadata.py b/tuf/api/metadata.py index b6eaa84049..d995ff1cc8 100644 --- a/tuf/api/metadata.py +++ b/tuf/api/metadata.py @@ -791,7 +791,7 @@ def __init__( self.path_hash_prefixes = path_hash_prefixes @classmethod - def from_dict(cls, role_dict: Mapping[str, Any]) -> "Role": + def from_dict(cls, role_dict: Dict[str, Any]) -> "DelegatedRole": """Creates DelegatedRole object from its dict representation.""" name = role_dict.pop("name") keyids = role_dict.pop("keyids")