diff --git a/third_party/2and3/pynamodb/__init__.pyi b/third_party/2and3/pynamodb/__init__.pyi deleted file mode 100644 index 83e691d7a..000000000 --- a/third_party/2and3/pynamodb/__init__.pyi +++ /dev/null @@ -1 +0,0 @@ -__license__: str diff --git a/third_party/2and3/pynamodb/attributes.pyi b/third_party/2and3/pynamodb/attributes.pyi deleted file mode 100644 index 2dea16016..000000000 --- a/third_party/2and3/pynamodb/attributes.pyi +++ /dev/null @@ -1,118 +0,0 @@ -from datetime import datetime -from typing import Any, Callable, Dict, Generic, Iterable, List, Mapping, Optional, Set, Text, Type, TypeVar, Union - -_T = TypeVar("_T") -_KT = TypeVar("_KT") -_VT = TypeVar("_VT") -_MT = TypeVar("_MT", bound=MapAttribute[Any, Any]) - -class Attribute(Generic[_T]): - attr_name: Optional[Text] - attr_type: Text - null: bool - default: Any - is_hash_key: bool - is_range_key: bool - def __init__( - self, - hash_key: bool = ..., - range_key: bool = ..., - null: Optional[bool] = ..., - default: Optional[Union[_T, Callable[..., _T]]] = ..., - attr_name: Optional[Text] = ..., - ) -> None: ... - def __set__(self, instance: Any, value: Optional[_T]) -> None: ... - def serialize(self, value: Any) -> Any: ... - def deserialize(self, value: Any) -> Any: ... - def get_value(self, value: Any) -> Any: ... - def between(self, lower: Any, upper: Any) -> Any: ... - def is_in(self, *values: Any) -> Any: ... - def exists(self) -> Any: ... - def does_not_exist(self) -> Any: ... - def is_type(self) -> Any: ... - def startswith(self, prefix: str) -> Any: ... - def contains(self, item: Any) -> Any: ... - def append(self, other: Any) -> Any: ... - def prepend(self, other: Any) -> Any: ... - def set(self, value: Any) -> Any: ... - def remove(self) -> Any: ... - def add(self, *values: Any) -> Any: ... - def delete(self, *values: Any) -> Any: ... - -class SetMixin(object): - def serialize(self, value): ... - def deserialize(self, value): ... - -class BinaryAttribute(Attribute[bytes]): - def __get__(self, instance: Any, owner: Any) -> bytes: ... - -class BinarySetAttribute(SetMixin, Attribute[Set[bytes]]): - def __get__(self, instance: Any, owner: Any) -> Set[bytes]: ... - -class UnicodeSetAttribute(SetMixin, Attribute[Set[Text]]): - def element_serialize(self, value: Any) -> Any: ... - def element_deserialize(self, value: Any) -> Any: ... - def __get__(self, instance: Any, owner: Any) -> Set[Text]: ... - -class UnicodeAttribute(Attribute[Text]): - def __get__(self, instance: Any, owner: Any) -> Text: ... - -class JSONAttribute(Attribute[Any]): - def __get__(self, instance: Any, owner: Any) -> Any: ... - -class LegacyBooleanAttribute(Attribute[bool]): - def __get__(self, instance: Any, owner: Any) -> bool: ... - -class BooleanAttribute(Attribute[bool]): - def __get__(self, instance: Any, owner: Any) -> bool: ... - -class NumberSetAttribute(SetMixin, Attribute[Set[float]]): - def __get__(self, instance: Any, owner: Any) -> Set[float]: ... - -class NumberAttribute(Attribute[float]): - def __get__(self, instance: Any, owner: Any) -> float: ... - -class UTCDateTimeAttribute(Attribute[datetime]): - def __get__(self, instance: Any, owner: Any) -> datetime: ... - -class NullAttribute(Attribute[None]): - def __get__(self, instance: Any, owner: Any) -> None: ... - -class MapAttributeMeta(type): - def __init__(self, name, bases, attrs) -> None: ... - -class MapAttribute(Attribute[Mapping[_KT, _VT]], metaclass=MapAttributeMeta): - attribute_values: Any - def __init__( - self, - hash_key: bool = ..., - range_key: bool = ..., - null: Optional[bool] = ..., - default: Optional[Union[Any, Callable[..., Any]]] = ..., - attr_name: Optional[Text] = ..., - **attrs, - ) -> None: ... - def __iter__(self) -> Iterable[_VT]: ... - def __getattr__(self, attr: str) -> _VT: ... - def __getitem__(self, item: _KT) -> _VT: ... - def __set__(self, instance: Any, value: Union[None, MapAttribute[_KT, _VT], Mapping[_KT, _VT]]) -> None: ... - def __get__(self: _MT, instance: Any, owner: Any) -> _MT: ... - def is_type_safe(self, key: Any, value: Any) -> bool: ... - def validate(self) -> bool: ... - -class ListAttribute(Attribute[List[_T]]): - element_type: Any - 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: ... - def __get__(self, instance: Any, owner: Any) -> List[_T]: ... - -DESERIALIZE_CLASS_MAP: Dict[Text, Attribute[Any]] -SERIALIZE_CLASS_MAP: Dict[Type[Any], Attribute[Any]] -SERIALIZE_KEY_MAP: Dict[Type[Any], Text] diff --git a/third_party/2and3/pynamodb/connection/__init__.pyi b/third_party/2and3/pynamodb/connection/__init__.pyi deleted file mode 100644 index 1860736ba..000000000 --- a/third_party/2and3/pynamodb/connection/__init__.pyi +++ /dev/null @@ -1,2 +0,0 @@ -from pynamodb.connection.base import Connection as Connection -from pynamodb.connection.table import TableConnection as TableConnection diff --git a/third_party/2and3/pynamodb/connection/base.pyi b/third_party/2and3/pynamodb/connection/base.pyi deleted file mode 100644 index 05e6b2eb9..000000000 --- a/third_party/2and3/pynamodb/connection/base.pyi +++ /dev/null @@ -1,158 +0,0 @@ -from typing import Any, Dict, Optional, Text - -BOTOCORE_EXCEPTIONS: Any -log: Any - -class MetaTable: - data: Dict[Any, Any] - def __init__(self, data: Dict[Any, Any]) -> None: ... - @property - def range_keyname(self) -> Optional[Text]: ... - @property - def hash_keyname(self) -> Text: ... - def get_index_hash_keyname(self, index_name: Text) -> Optional[Text]: ... - def get_item_attribute_map(self, attributes, item_key: Any = ..., pythonic_key: bool = ...): ... - def get_attribute_type(self, attribute_name, value: Optional[Any] = ...): ... - def get_identifier_map(self, hash_key, range_key: Optional[Any] = ..., key: Any = ...): ... - def get_exclusive_start_key_map(self, exclusive_start_key): ... - -class Connection: - host: Any - region: Any - session_cls: Any - def __init__( - self, - region: Optional[Any] = ..., - host: Optional[Any] = ..., - session_cls: Optional[Any] = ..., - request_timeout_seconds: Optional[Any] = ..., - max_retry_attempts: Optional[Any] = ..., - base_backoff_ms: Optional[Any] = ..., - ) -> None: ... - def dispatch(self, operation_name, operation_kwargs): ... - @property - def session(self): ... - @property - def requests_session(self): ... - @property - def client(self): ... - def get_meta_table(self, table_name: Text, refresh: bool = ...): ... - def create_table( - self, - table_name: Text, - attribute_definitions: Optional[Any] = ..., - key_schema: Optional[Any] = ..., - read_capacity_units: Optional[Any] = ..., - write_capacity_units: Optional[Any] = ..., - global_secondary_indexes: Optional[Any] = ..., - local_secondary_indexes: Optional[Any] = ..., - stream_specification: Optional[Any] = ..., - ): ... - def delete_table(self, table_name: Text): ... - def update_table( - self, - table_name: Text, - read_capacity_units: Optional[Any] = ..., - write_capacity_units: Optional[Any] = ..., - global_secondary_index_updates: Optional[Any] = ..., - ): ... - def list_tables(self, exclusive_start_table_name: Optional[Any] = ..., limit: Optional[Any] = ...): ... - def describe_table(self, table_name: Text): ... - def get_conditional_operator(self, operator): ... - def get_item_attribute_map(self, table_name: Text, attributes, item_key: Any = ..., pythonic_key: bool = ...): ... - def get_expected_map(self, table_name: Text, expected): ... - def parse_attribute(self, attribute, return_type: bool = ...): ... - def get_attribute_type(self, table_name: Text, attribute_name, value: Optional[Any] = ...): ... - def get_identifier_map(self, table_name: Text, hash_key, range_key: Optional[Any] = ..., key: Any = ...): ... - def get_query_filter_map(self, table_name: Text, query_filters): ... - def get_consumed_capacity_map(self, return_consumed_capacity): ... - def get_return_values_map(self, return_values): ... - def get_item_collection_map(self, return_item_collection_metrics): ... - def get_exclusive_start_key_map(self, table_name: Text, exclusive_start_key): ... - def delete_item( - self, - table_name: Text, - hash_key, - range_key: Optional[Any] = ..., - expected: Optional[Any] = ..., - conditional_operator: Optional[Any] = ..., - return_values: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - return_item_collection_metrics: Optional[Any] = ..., - ): ... - def update_item( - self, - table_name: Text, - hash_key, - range_key: Optional[Any] = ..., - attribute_updates: Optional[Any] = ..., - expected: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - conditional_operator: Optional[Any] = ..., - return_item_collection_metrics: Optional[Any] = ..., - return_values: Optional[Any] = ..., - ): ... - def put_item( - self, - table_name: Text, - hash_key, - range_key: Optional[Any] = ..., - attributes: Optional[Any] = ..., - expected: Optional[Any] = ..., - conditional_operator: Optional[Any] = ..., - return_values: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - return_item_collection_metrics: Optional[Any] = ..., - ): ... - def batch_write_item( - self, - table_name: Text, - put_items: Optional[Any] = ..., - delete_items: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - return_item_collection_metrics: Optional[Any] = ..., - ): ... - def batch_get_item( - self, - table_name: Text, - keys, - consistent_read: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - attributes_to_get: Optional[Any] = ..., - ): ... - def get_item( - self, - table_name: Text, - hash_key, - range_key: Optional[Any] = ..., - consistent_read: bool = ..., - attributes_to_get: Optional[Any] = ..., - ): ... - def scan( - self, - table_name: Text, - attributes_to_get: Optional[Any] = ..., - limit: Optional[Any] = ..., - conditional_operator: Optional[Any] = ..., - scan_filter: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - exclusive_start_key: Optional[Any] = ..., - segment: Optional[Any] = ..., - total_segments: Optional[Any] = ..., - ): ... - def query( - self, - table_name: Text, - hash_key, - attributes_to_get: Optional[Any] = ..., - consistent_read: bool = ..., - exclusive_start_key: Optional[Any] = ..., - index_name: Optional[Any] = ..., - key_conditions: Optional[Any] = ..., - query_filters: Optional[Any] = ..., - conditional_operator: Optional[Any] = ..., - limit: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - scan_index_forward: Optional[Any] = ..., - select: Optional[Any] = ..., - ): ... diff --git a/third_party/2and3/pynamodb/connection/table.pyi b/third_party/2and3/pynamodb/connection/table.pyi deleted file mode 100644 index 2d67c9d4d..000000000 --- a/third_party/2and3/pynamodb/connection/table.pyi +++ /dev/null @@ -1,108 +0,0 @@ -from typing import Any, Optional - -class TableConnection: - table_name: Any - connection: Any - def __init__( - self, - table_name, - region: Optional[Any] = ..., - host: Optional[Any] = ..., - session_cls: Optional[Any] = ..., - request_timeout_seconds: Optional[Any] = ..., - max_retry_attempts: Optional[Any] = ..., - base_backoff_ms: Optional[Any] = ..., - ) -> None: ... - def delete_item( - self, - hash_key, - range_key: Optional[Any] = ..., - expected: Optional[Any] = ..., - conditional_operator: Optional[Any] = ..., - return_values: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - return_item_collection_metrics: Optional[Any] = ..., - ): ... - def update_item( - self, - hash_key, - range_key: Optional[Any] = ..., - attribute_updates: Optional[Any] = ..., - expected: Optional[Any] = ..., - conditional_operator: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - return_item_collection_metrics: Optional[Any] = ..., - return_values: Optional[Any] = ..., - ): ... - def put_item( - self, - hash_key, - range_key: Optional[Any] = ..., - attributes: Optional[Any] = ..., - expected: Optional[Any] = ..., - conditional_operator: Optional[Any] = ..., - return_values: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - return_item_collection_metrics: Optional[Any] = ..., - ): ... - def batch_write_item( - self, - put_items: Optional[Any] = ..., - delete_items: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - return_item_collection_metrics: Optional[Any] = ..., - ): ... - def batch_get_item( - self, - keys, - consistent_read: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - attributes_to_get: Optional[Any] = ..., - ): ... - def get_item( - self, hash_key, range_key: Optional[Any] = ..., consistent_read: bool = ..., attributes_to_get: Optional[Any] = ... - ): ... - def scan( - self, - attributes_to_get: Optional[Any] = ..., - limit: Optional[Any] = ..., - conditional_operator: Optional[Any] = ..., - scan_filter: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - segment: Optional[Any] = ..., - total_segments: Optional[Any] = ..., - exclusive_start_key: Optional[Any] = ..., - ): ... - def query( - self, - hash_key, - attributes_to_get: Optional[Any] = ..., - consistent_read: bool = ..., - exclusive_start_key: Optional[Any] = ..., - index_name: Optional[Any] = ..., - key_conditions: Optional[Any] = ..., - query_filters: Optional[Any] = ..., - limit: Optional[Any] = ..., - return_consumed_capacity: Optional[Any] = ..., - scan_index_forward: Optional[Any] = ..., - conditional_operator: Optional[Any] = ..., - select: Optional[Any] = ..., - ): ... - def describe_table(self): ... - def delete_table(self): ... - def update_table( - self, - read_capacity_units: Optional[Any] = ..., - write_capacity_units: Optional[Any] = ..., - global_secondary_index_updates: Optional[Any] = ..., - ): ... - def create_table( - self, - attribute_definitions: Optional[Any] = ..., - key_schema: Optional[Any] = ..., - read_capacity_units: Optional[Any] = ..., - write_capacity_units: Optional[Any] = ..., - global_secondary_indexes: Optional[Any] = ..., - local_secondary_indexes: Optional[Any] = ..., - stream_specification: Optional[Any] = ..., - ): ... diff --git a/third_party/2and3/pynamodb/connection/util.pyi b/third_party/2and3/pynamodb/connection/util.pyi deleted file mode 100644 index 20635c69f..000000000 --- a/third_party/2and3/pynamodb/connection/util.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Text - -def pythonic(var_name: Text) -> Text: ... diff --git a/third_party/2and3/pynamodb/constants.pyi b/third_party/2and3/pynamodb/constants.pyi deleted file mode 100644 index 7c26cd619..000000000 --- a/third_party/2and3/pynamodb/constants.pyi +++ /dev/null @@ -1,166 +0,0 @@ -from typing import Any - -BATCH_WRITE_ITEM: str -DESCRIBE_TABLE: str -BATCH_GET_ITEM: str -CREATE_TABLE: str -UPDATE_TABLE: str -DELETE_TABLE: str -LIST_TABLES: str -UPDATE_ITEM: str -DELETE_ITEM: str -GET_ITEM: str -PUT_ITEM: str -QUERY: str -SCAN: str -GLOBAL_SECONDARY_INDEX_UPDATES: str -RETURN_ITEM_COLL_METRICS: str -EXCLUSIVE_START_TABLE_NAME: str -RETURN_CONSUMED_CAPACITY: str -COMPARISON_OPERATOR: str -SCAN_INDEX_FORWARD: str -ATTR_DEFINITIONS: str -ATTR_VALUE_LIST: str -TABLE_DESCRIPTION: str -UNPROCESSED_KEYS: str -UNPROCESSED_ITEMS: str -CONSISTENT_READ: str -DELETE_REQUEST: str -RETURN_VALUES: str -REQUEST_ITEMS: str -ATTRS_TO_GET: str -ATTR_UPDATES: str -TABLE_STATUS: str -SCAN_FILTER: str -TABLE_NAME: str -KEY_SCHEMA: str -ATTR_NAME: str -ATTR_TYPE: str -ITEM_COUNT: str -CAMEL_COUNT: str -PUT_REQUEST: str -INDEX_NAME: str -ATTRIBUTES: str -TABLE_KEY: str -RESPONSES: str -RANGE_KEY: str -KEY_TYPE: str -ACTION: str -UPDATE: str -EXISTS: str -SELECT: str -ACTIVE: str -LIMIT: str -ITEMS: str -ITEM: str -KEYS: str -UTC: str -KEY: str -DEFAULT_ENCODING: str -DEFAULT_REGION: str -DATETIME_FORMAT: str -SERVICE_NAME: str -HTTP_OK: int -HTTP_BAD_REQUEST: int -PROVISIONED_THROUGHPUT: str -READ_CAPACITY_UNITS: str -WRITE_CAPACITY_UNITS: str -STRING_SHORT: str -STRING_SET_SHORT: str -NUMBER_SHORT: str -NUMBER_SET_SHORT: str -BINARY_SHORT: str -BINARY_SET_SHORT: str -MAP_SHORT: str -LIST_SHORT: str -BOOLEAN: str -BOOLEAN_SHORT: str -STRING: str -STRING_SET: str -NUMBER: str -NUMBER_SET: str -BINARY: str -BINARY_SET: str -MAP: str -LIST: str -SHORT_ATTR_TYPES: Any -ATTR_TYPE_MAP: Any -LOCAL_SECONDARY_INDEX: str -LOCAL_SECONDARY_INDEXES: str -GLOBAL_SECONDARY_INDEX: str -GLOBAL_SECONDARY_INDEXES: str -PROJECTION: str -PROJECTION_TYPE: str -NON_KEY_ATTRIBUTES: str -KEYS_ONLY: str -ALL: str -INCLUDE: str -STREAM_VIEW_TYPE: str -STREAM_SPECIFICATION: str -STREAM_ENABLED: str -STREAM_NEW_IMAGE: str -STREAM_OLD_IMAGE: str -STREAM_NEW_AND_OLD_IMAGE: str -STREAM_KEYS_ONLY: str -EXCLUSIVE_START_KEY: str -LAST_EVALUATED_KEY: str -QUERY_FILTER: str -BEGINS_WITH: str -BETWEEN: str -EQ: str -NE: str -LE: str -LT: str -GE: str -GT: str -IN: str -KEY_CONDITIONS: str -COMPARISON_OPERATOR_VALUES: Any -QUERY_OPERATOR_MAP: Any -NOT_NULL: str -NULL: str -CONTAINS: str -NOT_CONTAINS: str -ALL_ATTRIBUTES: str -ALL_PROJECTED_ATTRIBUTES: str -SPECIFIC_ATTRIBUTES: str -COUNT: str -SELECT_VALUES: Any -SCAN_OPERATOR_MAP: Any -QUERY_FILTER_OPERATOR_MAP: Any -DELETE_FILTER_OPERATOR_MAP: Any -UPDATE_FILTER_OPERATOR_MAP: Any -PUT_FILTER_OPERATOR_MAP: Any -SEGMENT: str -TOTAL_SEGMENTS: str -SCAN_FILTER_VALUES: Any -QUERY_FILTER_VALUES: Any -DELETE_FILTER_VALUES: Any -VALUE: str -EXPECTED: str -CONSUMED_CAPACITY: str -CAPACITY_UNITS: str -INDEXES: str -TOTAL: str -NONE: str -RETURN_CONSUMED_CAPACITY_VALUES: Any -SIZE: str -RETURN_ITEM_COLL_METRICS_VALUES: Any -ALL_OLD: str -UPDATED_OLD: str -ALL_NEW: str -UPDATED_NEW: str -RETURN_VALUES_VALUES: Any -PUT: str -DELETE: str -ADD: str -ATTR_UPDATE_ACTIONS: Any -BATCH_GET_PAGE_LIMIT: int -BATCH_WRITE_PAGE_LIMIT: int -META_CLASS_NAME: str -REGION: str -HOST: str -CONDITIONAL_OPERATOR: str -AND: str -OR: str -CONDITIONAL_OPERATORS: Any diff --git a/third_party/2and3/pynamodb/exceptions.pyi b/third_party/2and3/pynamodb/exceptions.pyi deleted file mode 100644 index 728db4a7b..000000000 --- a/third_party/2and3/pynamodb/exceptions.pyi +++ /dev/null @@ -1,23 +0,0 @@ -from typing import Any, Optional, Text - -class PynamoDBException(Exception): - msg: str - cause: Any - def __init__(self, msg: Optional[Text] = ..., cause: Optional[Exception] = ...) -> None: ... - -class PynamoDBConnectionError(PynamoDBException): ... -class DeleteError(PynamoDBConnectionError): ... -class QueryError(PynamoDBConnectionError): ... -class ScanError(PynamoDBConnectionError): ... -class PutError(PynamoDBConnectionError): ... -class UpdateError(PynamoDBConnectionError): ... -class GetError(PynamoDBConnectionError): ... -class TableError(PynamoDBConnectionError): ... -class DoesNotExist(PynamoDBException): ... - -class TableDoesNotExist(PynamoDBException): - def __init__(self, table_name) -> None: ... - -class VerboseClientError(Exception): - MSG_TEMPLATE: Any - def __init__(self, error_response, operation_name, verbose_properties: Optional[Any] = ...) -> None: ... diff --git a/third_party/2and3/pynamodb/indexes.pyi b/third_party/2and3/pynamodb/indexes.pyi deleted file mode 100644 index 99db1146b..000000000 --- a/third_party/2and3/pynamodb/indexes.pyi +++ /dev/null @@ -1,39 +0,0 @@ -from typing import Any, Optional - -class IndexMeta(type): - def __init__(self, name, bases, attrs) -> None: ... - -class Index(metaclass=IndexMeta): - Meta: Any - def __init__(self) -> None: ... - @classmethod - def count(cls, hash_key, consistent_read: bool = ..., **filters) -> int: ... - @classmethod - def query( - cls, - hash_key, - scan_index_forward: Optional[Any] = ..., - consistent_read: bool = ..., - limit: Optional[Any] = ..., - last_evaluated_key: Optional[Any] = ..., - attributes_to_get: Optional[Any] = ..., - **filters, - ): ... - -class GlobalSecondaryIndex(Index): ... -class LocalSecondaryIndex(Index): ... - -class Projection(object): - projection_type: Any - non_key_attributes: Any - -class KeysOnlyProjection(Projection): - projection_type: Any - -class IncludeProjection(Projection): - projection_type: Any - non_key_attributes: Any - def __init__(self, non_attr_keys: Optional[Any] = ...) -> None: ... - -class AllProjection(Projection): - projection_type: Any diff --git a/third_party/2and3/pynamodb/models.pyi b/third_party/2and3/pynamodb/models.pyi deleted file mode 100644 index 023a2eef5..000000000 --- a/third_party/2and3/pynamodb/models.pyi +++ /dev/null @@ -1,159 +0,0 @@ -from typing import Any, Dict, Generic, Iterable, Iterator, List, Optional, Sequence, Text, Tuple, Type, TypeVar, Union - -from .attributes import Attribute -from .exceptions import DoesNotExist as DoesNotExist - -log: Any - -class DefaultMeta: ... - -class ResultSet(object): - results: Any - operation: Any - arguments: Any - def __init__(self, results, operation, arguments) -> None: ... - def __iter__(self): ... - -class MetaModel(type): - def __init__(self, name: Text, bases: Tuple[type, ...], attrs: Dict[Any, Any]) -> None: ... - -_T = TypeVar("_T", bound="Model") -KeyType = Union[Text, bytes, float, int, Tuple[Any, ...]] - -class Model(metaclass=MetaModel): - DoesNotExist = DoesNotExist - attribute_values: Dict[Text, Any] - def __init__(self, hash_key: Optional[KeyType] = ..., range_key: Optional[Any] = ..., **attrs) -> None: ... - @classmethod - def has_map_or_list_attributes(cls: Type[_T]) -> bool: ... - @classmethod - def batch_get( - cls: Type[_T], - items: Iterable[Union[KeyType, Iterable[KeyType]]], - consistent_read: Optional[bool] = ..., - attributes_to_get: Optional[Sequence[Text]] = ..., - ) -> Iterator[_T]: ... - @classmethod - def batch_write(cls: Type[_T], auto_commit: bool = ...) -> BatchWrite[_T]: ... - def delete(self, condition: Optional[Any] = ..., conditional_operator: Optional[Text] = ..., **expected_values) -> Any: ... - def update( - self, - attributes: Optional[Dict[Text, Dict[Text, Any]]] = ..., - actions: Optional[List[Any]] = ..., - condition: Optional[Any] = ..., - conditional_operator: Optional[Text] = ..., - **expected_values, - ) -> Any: ... - def update_item( - self, - attribute: Text, - value: Optional[Any] = ..., - action: Optional[Text] = ..., - conditional_operator: Optional[Text] = ..., - **expected_values, - ): ... - def save( - self, condition: Optional[Any] = ..., conditional_operator: Optional[Text] = ..., **expected_values - ) -> Dict[str, Any]: ... - def refresh(self, consistent_read: bool = ...): ... - @classmethod - def get(cls: Type[_T], hash_key: KeyType, range_key: Optional[KeyType] = ..., consistent_read: bool = ...) -> _T: ... - @classmethod - def from_raw_data(cls: Type[_T], data) -> _T: ... - @classmethod - def count( - cls: Type[_T], - hash_key: Optional[KeyType] = ..., - consistent_read: bool = ..., - index_name: Optional[Text] = ..., - limit: Optional[int] = ..., - **filters, - ) -> int: ... - @classmethod - def query( - cls: Type[_T], - hash_key: KeyType, - consistent_read: bool = ..., - index_name: Optional[Text] = ..., - scan_index_forward: Optional[Any] = ..., - conditional_operator: Optional[Text] = ..., - limit: Optional[int] = ..., - last_evaluated_key: Optional[Any] = ..., - attributes_to_get: Optional[Iterable[Text]] = ..., - page_size: Optional[int] = ..., - **filters, - ) -> Iterator[_T]: ... - @classmethod - def rate_limited_scan( - cls: Type[_T], - # TODO: annotate Condition class - filter_condition: Optional[Any] = ..., - attributes_to_get: Optional[Sequence[Text]] = ..., - segment: Optional[int] = ..., - total_segments: Optional[int] = ..., - limit: Optional[int] = ..., - conditional_operator: Optional[Text] = ..., - last_evaluated_key: Optional[Any] = ..., - page_size: Optional[int] = ..., - timeout_seconds: Optional[int] = ..., - read_capacity_to_consume_per_second: int = ..., - allow_rate_limited_scan_without_consumed_capacity: Optional[bool] = ..., - max_sleep_between_retry: int = ..., - max_consecutive_exceptions: int = ..., - consistent_read: Optional[bool] = ..., - index_name: Optional[str] = ..., - **filters: Any, - ) -> Iterator[_T]: ... - @classmethod - def scan( - cls: Type[_T], - segment: Optional[int] = ..., - total_segments: Optional[int] = ..., - limit: Optional[int] = ..., - conditional_operator: Optional[Text] = ..., - last_evaluated_key: Optional[Any] = ..., - page_size: Optional[int] = ..., - **filters, - ) -> Iterator[_T]: ... - @classmethod - def exists(cls: Type[_T]) -> bool: ... - @classmethod - def delete_table(cls): ... - @classmethod - def describe_table(cls): ... - @classmethod - def create_table( - cls: Type[_T], wait: bool = ..., read_capacity_units: Optional[Any] = ..., write_capacity_units: Optional[Any] = ... - ): ... - @classmethod - def dumps(cls): ... - @classmethod - def dump(cls, filename): ... - @classmethod - def loads(cls, data): ... - @classmethod - def load(cls, filename): ... - @classmethod - def add_throttle_record(cls, records): ... - @classmethod - def get_throttle(cls): ... - @classmethod - def get_attributes(cls) -> Dict[str, Attribute[Any]]: ... - @classmethod - def _get_attributes(cls) -> Dict[str, Attribute[Any]]: ... - -class ModelContextManager(Generic[_T]): - model: Type[_T] - auto_commit: bool - max_operations: int - pending_operations: List[Dict[Text, Any]] - def __init__(self, model: Type[_T], auto_commit: bool = ...) -> None: ... - def __enter__(self) -> ModelContextManager[_T]: ... - -class BatchWrite(ModelContextManager[_T]): - def save(self, put_item: _T) -> None: ... - def delete(self, del_item: _T) -> None: ... - def __enter__(self) -> BatchWrite[_T]: ... - def __exit__(self, exc_type, exc_val, exc_tb) -> None: ... - pending_operations: Any - def commit(self) -> None: ... diff --git a/third_party/2and3/pynamodb/settings.pyi b/third_party/2and3/pynamodb/settings.pyi deleted file mode 100644 index 76fc4172f..000000000 --- a/third_party/2and3/pynamodb/settings.pyi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import Any - -log: Any -default_settings_dict: Any -OVERRIDE_SETTINGS_PATH: Any -override_settings: Any - -def get_settings_value(key): ... diff --git a/third_party/2and3/pynamodb/throttle.pyi b/third_party/2and3/pynamodb/throttle.pyi deleted file mode 100644 index 6948b6896..000000000 --- a/third_party/2and3/pynamodb/throttle.pyi +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Any, Optional - -log: Any - -class ThrottleBase: - capacity: Any - window: Any - records: Any - sleep_interval: Any - def __init__(self, capacity, window: int = ..., initial_sleep: Optional[Any] = ...) -> None: ... - def add_record(self, record): ... - def throttle(self): ... - -class NoThrottle(ThrottleBase): - def __init__(self) -> None: ... - def add_record(self, record): ... - -class Throttle(ThrottleBase): - def throttle(self): ... diff --git a/third_party/2and3/pynamodb/types.pyi b/third_party/2and3/pynamodb/types.pyi deleted file mode 100644 index 14195f04f..000000000 --- a/third_party/2and3/pynamodb/types.pyi +++ /dev/null @@ -1,5 +0,0 @@ -STRING: str -NUMBER: str -BINARY: str -HASH: str -RANGE: str