mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-13 10:08:27 +08:00
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](https://github.com/pynamodb/PynamoDB/blob/495eae28679c781afc27f7d2d8c417e2302ed2a1/pynamodb/attributes.py#L418) method just calls `json.loads`.
This commit is contained in:
committed by
Jelle Zijlstra
parent
ebed7c2ecb
commit
dc46a435da
+2
-2
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user