@@ -119,7 +119,7 @@ def _clean_attribute(
119119
120120
121121def _clean_extended_attribute_value (
122- value : types .AttributeValue , max_len : Optional [int ]
122+ value : types .AnyValue , max_len : Optional [int ]
123123) -> types .AnyValue :
124124 # for primitive types just return the value and eventually shorten the string length
125125 if value is None or isinstance (value , _VALID_ATTR_VALUE_TYPES ):
@@ -188,7 +188,7 @@ def _clean_extended_attribute_value(
188188
189189
190190def _clean_extended_attribute (
191- key : str , value : types .AttributeValue , max_len : Optional [int ]
191+ key : str , value : types .AnyValue , max_len : Optional [int ]
192192) -> types .AnyValue :
193193 """Checks if attribute value is valid and cleans it if required.
194194
@@ -255,8 +255,8 @@ def __init__(
255255 # OrderedDict is not used until the maxlen is reached for efficiency.
256256
257257 self ._dict : Union [
258- MutableMapping [str , types .AttributeValue ],
259- OrderedDict [str , types .AttributeValue ],
258+ MutableMapping [str , types .AnyValue ],
259+ OrderedDict [str , types .AnyValue ],
260260 ] = {}
261261 self ._lock = threading .RLock ()
262262 if attributes :
@@ -267,10 +267,10 @@ def __init__(
267267 def __repr__ (self ) -> str :
268268 return f"{ dict (self ._dict )} "
269269
270- def __getitem__ (self , key : str ) -> types .AttributeValue :
270+ def __getitem__ (self , key : str ) -> types .AnyValue :
271271 return self ._dict [key ]
272272
273- def __setitem__ (self , key : str , value : types .AttributeValue ) -> None :
273+ def __setitem__ (self , key : str , value : types .AnyValue ) -> None :
274274 if getattr (self , "_immutable" , False ): # type: ignore
275275 raise TypeError
276276 with self ._lock :
0 commit comments