@@ -119,7 +119,7 @@ def _clean_attribute(
119
119
120
120
121
121
def _clean_extended_attribute_value (
122
- value : types .AttributeValue , max_len : Optional [int ]
122
+ value : types .AnyValue , max_len : Optional [int ]
123
123
) -> types .AnyValue :
124
124
# for primitive types just return the value and eventually shorten the string length
125
125
if value is None or isinstance (value , _VALID_ATTR_VALUE_TYPES ):
@@ -188,7 +188,7 @@ def _clean_extended_attribute_value(
188
188
189
189
190
190
def _clean_extended_attribute (
191
- key : str , value : types .AttributeValue , max_len : Optional [int ]
191
+ key : str , value : types .AnyValue , max_len : Optional [int ]
192
192
) -> types .AnyValue :
193
193
"""Checks if attribute value is valid and cleans it if required.
194
194
@@ -255,8 +255,8 @@ def __init__(
255
255
# OrderedDict is not used until the maxlen is reached for efficiency.
256
256
257
257
self ._dict : Union [
258
- MutableMapping [str , types .AttributeValue ],
259
- OrderedDict [str , types .AttributeValue ],
258
+ MutableMapping [str , types .AnyValue ],
259
+ OrderedDict [str , types .AnyValue ],
260
260
] = {}
261
261
self ._lock = threading .RLock ()
262
262
if attributes :
@@ -267,10 +267,10 @@ def __init__(
267
267
def __repr__ (self ) -> str :
268
268
return f"{ dict (self ._dict )} "
269
269
270
- def __getitem__ (self , key : str ) -> types .AttributeValue :
270
+ def __getitem__ (self , key : str ) -> types .AnyValue :
271
271
return self ._dict [key ]
272
272
273
- def __setitem__ (self , key : str , value : types .AttributeValue ) -> None :
273
+ def __setitem__ (self , key : str , value : types .AnyValue ) -> None :
274
274
if getattr (self , "_immutable" , False ): # type: ignore
275
275
raise TypeError
276
276
with self ._lock :
0 commit comments