@@ -130,11 +130,11 @@ def __init__(
130130 self ,
131131 signed : T ,
132132 signatures : Optional [Dict [str , Signature ]] = None ,
133- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
133+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
134134 ):
135135 self .signed : T = signed
136136 self .signatures = signatures if signatures is not None else {}
137- self .unrecognized_fields : Mapping [str , Any ] = unrecognized_fields or {}
137+ self .unrecognized_fields : Dict [str , Any ] = unrecognized_fields or {}
138138
139139 def __eq__ (self , other : Any ) -> bool :
140140 if not isinstance (other , Metadata ):
@@ -494,7 +494,7 @@ def __init__(
494494 version : Optional [int ],
495495 spec_version : Optional [str ],
496496 expires : Optional [datetime ],
497- unrecognized_fields : Optional [Mapping [str , Any ]],
497+ unrecognized_fields : Optional [Dict [str , Any ]],
498498 ):
499499 if spec_version is None :
500500 spec_version = "." .join (SPECIFICATION_VERSION )
@@ -519,7 +519,7 @@ def __init__(
519519 raise ValueError (f"version must be > 0, got { version } " )
520520 self .version = version
521521
522- self .unrecognized_fields : Mapping [str , Any ] = unrecognized_fields or {}
522+ self .unrecognized_fields : Dict [str , Any ] = unrecognized_fields or {}
523523
524524 def __eq__ (self , other : Any ) -> bool :
525525 if not isinstance (other , Signed ):
@@ -629,7 +629,7 @@ def __init__(
629629 keytype : str ,
630630 scheme : str ,
631631 keyval : Dict [str , str ],
632- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
632+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
633633 ):
634634 if not all (
635635 isinstance (at , str ) for at in [keyid , keytype , scheme ]
@@ -639,7 +639,7 @@ def __init__(
639639 self .keytype = keytype
640640 self .scheme = scheme
641641 self .keyval = keyval
642- self .unrecognized_fields : Mapping [str , Any ] = unrecognized_fields or {}
642+ self .unrecognized_fields : Dict [str , Any ] = unrecognized_fields or {}
643643
644644 def __eq__ (self , other : Any ) -> bool :
645645 if not isinstance (other , Key ):
@@ -789,15 +789,15 @@ def __init__(
789789 self ,
790790 keyids : List [str ],
791791 threshold : int ,
792- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
792+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
793793 ):
794794 if len (set (keyids )) != len (keyids ):
795795 raise ValueError (f"Nonunique keyids: { keyids } " )
796796 if threshold < 1 :
797797 raise ValueError ("threshold should be at least 1!" )
798798 self .keyids = keyids
799799 self .threshold = threshold
800- self .unrecognized_fields : Mapping [str , Any ] = unrecognized_fields or {}
800+ self .unrecognized_fields : Dict [str , Any ] = unrecognized_fields or {}
801801
802802 def __eq__ (self , other : Any ) -> bool :
803803 if not isinstance (other , Role ):
@@ -865,7 +865,7 @@ def __init__(
865865 keys : Optional [Dict [str , Key ]] = None ,
866866 roles : Optional [Mapping [str , Role ]] = None ,
867867 consistent_snapshot : Optional [bool ] = True ,
868- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
868+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
869869 ):
870870 super ().__init__ (version , spec_version , expires , unrecognized_fields )
871871 self .consistent_snapshot = consistent_snapshot
@@ -1055,7 +1055,7 @@ def __init__(
10551055 version : int ,
10561056 length : Optional [int ] = None ,
10571057 hashes : Optional [Dict [str , str ]] = None ,
1058- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
1058+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
10591059 ):
10601060
10611061 if version <= 0 :
@@ -1068,7 +1068,7 @@ def __init__(
10681068 self .version = version
10691069 self .length = length
10701070 self .hashes = hashes
1071- self .unrecognized_fields : Mapping [str , Any ] = unrecognized_fields or {}
1071+ self .unrecognized_fields : Dict [str , Any ] = unrecognized_fields or {}
10721072
10731073 def __eq__ (self , other : Any ) -> bool :
10741074 if not isinstance (other , MetaFile ):
@@ -1158,7 +1158,7 @@ def __init__(
11581158 spec_version : Optional [str ] = None ,
11591159 expires : Optional [datetime ] = None ,
11601160 snapshot_meta : Optional [MetaFile ] = None ,
1161- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
1161+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
11621162 ):
11631163 super ().__init__ (version , spec_version , expires , unrecognized_fields )
11641164 self .snapshot_meta = snapshot_meta or MetaFile (1 )
@@ -1221,7 +1221,7 @@ def __init__(
12211221 spec_version : Optional [str ] = None ,
12221222 expires : Optional [datetime ] = None ,
12231223 meta : Optional [Dict [str , MetaFile ]] = None ,
1224- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
1224+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
12251225 ):
12261226 super ().__init__ (version , spec_version , expires , unrecognized_fields )
12271227 self .meta = meta if meta is not None else {"targets.json" : MetaFile (1 )}
@@ -1295,7 +1295,7 @@ def __init__(
12951295 terminating : bool ,
12961296 paths : Optional [List [str ]] = None ,
12971297 path_hash_prefixes : Optional [List [str ]] = None ,
1298- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
1298+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
12991299 ):
13001300 super ().__init__ (keyids , threshold , unrecognized_fields )
13011301 self .name = name
@@ -1443,7 +1443,7 @@ def __init__(
14431443 self ,
14441444 keys : Dict [str , Key ],
14451445 roles : Dict [str , DelegatedRole ],
1446- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
1446+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
14471447 ):
14481448 self .keys = keys
14491449
@@ -1523,7 +1523,7 @@ def __init__(
15231523 length : int ,
15241524 hashes : Dict [str , str ],
15251525 path : str ,
1526- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
1526+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
15271527 ):
15281528
15291529 self ._validate_length (length )
@@ -1694,7 +1694,7 @@ def __init__(
16941694 expires : Optional [datetime ] = None ,
16951695 targets : Optional [Dict [str , TargetFile ]] = None ,
16961696 delegations : Optional [Delegations ] = None ,
1697- unrecognized_fields : Optional [Mapping [str , Any ]] = None ,
1697+ unrecognized_fields : Optional [Dict [str , Any ]] = None ,
16981698 ) -> None :
16991699 super ().__init__ (version , spec_version , expires , unrecognized_fields )
17001700 self .targets = targets if targets is not None else {}
0 commit comments