allow all valid JSON in pynamodb JSONAttribute (#1604)

Currently, the type definition for `JSONAttribute` assumes the deserialized value will be a `dict`. However, a `list` is also a valid `JSONAttribute` (its [deserialize](495eae2867/pynamodb/attributes.py (L418)) method just calls `json.loads`.
This commit is contained in:
Jonathan Schoonhoven
2017-09-22 06:57:51 -07:00
committed by Jelle Zijlstra
parent ebed7c2ecb
commit dc46a435da

View File

@@ -39,8 +39,8 @@ class UnicodeSetAttribute(SetMixin, Attribute[Set[Text]]):
class UnicodeAttribute(Attribute[Text]):
def __get__(self, instance: Any, owner: Any) -> Text: ...
class JSONAttribute(Attribute[Dict[Text, Any]]):
def __get__(self, instance: Any, owner: Any) -> Dict[Text, Any]: ...
class JSONAttribute(Attribute[Any]):
def __get__(self, instance: Any, owner: Any) -> Any: ...
class LegacyBooleanAttribute(Attribute[bool]):
def __get__(self, instance: Any, owner: Any) -> bool: ...