mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 20:01:29 +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](495eae2867/pynamodb/attributes.py (L418)) method just calls `json.loads`.
This commit is contained in:
committed by
Jelle Zijlstra
parent
ebed7c2ecb
commit
dc46a435da
4
third_party/2and3/pynamodb/attributes.pyi
vendored
4
third_party/2and3/pynamodb/attributes.pyi
vendored
@@ -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