massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / third_party / 2and3 / pynamodb / attributes.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/third_party/2and3/pynamodb/attributes.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/third_party/2and3/pynamodb/attributes.pyi
new file mode 100644 (file)
index 0000000..3099821
--- /dev/null
@@ -0,0 +1,96 @@
+from typing import Any, Callable, Dict, Generic, Iterable, List, Mapping, Optional, Text, Type, TypeVar, Union, Set\r
+\r
+from datetime import datetime\r
+\r
+_T = TypeVar('_T')\r
+_KT = TypeVar('_KT')\r
+_VT = TypeVar('_VT')\r
+_MT = TypeVar('_MT', bound='MapAttribute')\r
+\r
+class Attribute(Generic[_T]):\r
+    attr_name: Optional[Text]\r
+    attr_type: Text\r
+    null: bool\r
+    default: Any\r
+    is_hash_key: bool\r
+    is_range_key: bool\r
+    def __init__(self, hash_key: bool = ..., range_key: bool = ..., null: Optional[bool] = ..., default: Optional[Union[_T, Callable[..., _T]]] = ..., attr_name: Optional[Text] = ...) -> None: ...\r
+    def __set__(self, instance: Any, value: Optional[_T]) -> None: ...\r
+    def serialize(self, value: Any) -> Any: ...\r
+    def deserialize(self, value: Any) -> Any: ...\r
+    def get_value(self, value: Any) -> Any: ...\r
+    def between(self, lower: Any, upper: Any) -> Any: ...\r
+    def is_in(self, *values: Any) -> Any: ...\r
+    def exists(self) -> Any: ...\r
+    def does_not_exist(self) -> Any: ...\r
+    def is_type(self) -> Any: ...\r
+    def startswith(self, prefix: str) -> Any: ...\r
+    def contains(self, item: Any) -> Any: ...\r
+    def append(self, other: Any) -> Any: ...\r
+    def prepend(self, other: Any) -> Any: ...\r
+    def set(self, value: Any) -> Any: ...\r
+    def remove(self) -> Any: ...\r
+    def add(self, *values: Any) -> Any: ...\r
+    def delete(self, *values: Any) -> Any: ...\r
+\r
+class SetMixin(object):\r
+    def serialize(self, value): ...\r
+    def deserialize(self, value): ...\r
+\r
+class BinaryAttribute(Attribute[bytes]):\r
+    def __get__(self, instance: Any, owner: Any) -> bytes: ...\r
+\r
+class BinarySetAttribute(SetMixin, Attribute[Set[bytes]]):\r
+    def __get__(self, instance: Any, owner: Any) -> Set[bytes]: ...\r
+\r
+class UnicodeSetAttribute(SetMixin, Attribute[Set[Text]]):\r
+    def element_serialize(self, value: Any) -> Any: ...\r
+    def element_deserialize(self, value: Any) -> Any: ...\r
+    def __get__(self, instance: Any, owner: Any) -> Set[Text]: ...\r
+\r
+class UnicodeAttribute(Attribute[Text]):\r
+    def __get__(self, instance: Any, owner: Any) -> Text: ...\r
+\r
+class JSONAttribute(Attribute[Any]):\r
+    def __get__(self, instance: Any, owner: Any) -> Any: ...\r
+\r
+class LegacyBooleanAttribute(Attribute[bool]):\r
+    def __get__(self, instance: Any, owner: Any) -> bool: ...\r
+\r
+class BooleanAttribute(Attribute[bool]):\r
+    def __get__(self, instance: Any, owner: Any) -> bool: ...\r
+\r
+class NumberSetAttribute(SetMixin, Attribute[Set[float]]):\r
+    def __get__(self, instance: Any, owner: Any) -> Set[float]: ...\r
+\r
+class NumberAttribute(Attribute[float]):\r
+    def __get__(self, instance: Any, owner: Any) -> float: ...\r
+\r
+class UTCDateTimeAttribute(Attribute[datetime]):\r
+    def __get__(self, instance: Any, owner: Any) -> datetime: ...\r
+\r
+class NullAttribute(Attribute[None]):\r
+    def __get__(self, instance: Any, owner: Any) -> None: ...\r
+\r
+class MapAttributeMeta(type):\r
+    def __init__(cls, name, bases, attrs) -> None: ...\r
+\r
+class MapAttribute(Generic[_KT, _VT], Attribute[Mapping[_KT, _VT]], metaclass=MapAttributeMeta):\r
+    attribute_values: Any\r
+    def __init__(self, hash_key: bool = ..., range_key: bool = ..., null: Optional[bool] = ..., default: Optional[Union[Any, Callable[..., Any]]] = ..., attr_name: Optional[Text] = ..., **attrs) -> None: ...\r
+    def __iter__(self) -> Iterable[_VT]: ...\r
+    def __getattr__(self, attr: str) -> _VT: ...\r
+    def __getitem__(self, item: _KT) -> _VT: ...\r
+    def __set__(self, instance: Any, value: Union[None, MapAttribute[_KT, _VT], Mapping[_KT, _VT]]) -> None: ...\r
+    def __get__(self: _MT, instance: Any, owner: Any) -> _MT: ...\r
+    def is_type_safe(self, key: Any, value: Any) -> bool: ...\r
+    def validate(self) -> bool: ...\r
+\r
+class ListAttribute(Generic[_T], Attribute[List[_T]]):\r
+    element_type: Any\r
+    def __init__(self, hash_key: bool = ..., range_key: bool = ..., null: Optional[bool] = ..., default: Optional[Union[Any, Callable[..., Any]]] = ..., attr_name: Optional[Text] = ..., of: Optional[Type[_T]] = ...) -> None: ...\r
+    def __get__(self, instance: Any, owner: Any) -> List[_T]: ...\r
+\r
+DESERIALIZE_CLASS_MAP: Dict[Text, Attribute]\r
+SERIALIZE_CLASS_MAP: Dict[Type, Attribute]\r
+SERIALIZE_KEY_MAP: Dict[Type, Text]\r