Add pynamodb.models.Model.get_attribute and narrow down the type (#2689)

This commit is contained in:
Ilya Konstantinov
2018-12-17 08:06:42 -08:00
committed by Sebastian Rittau
parent bf410fb9ef
commit 1564770456

View File

@@ -1,3 +1,4 @@
from .attributes import Attribute
from .exceptions import DoesNotExist as DoesNotExist
from typing import Any, Dict, Generic, Iterable, Iterator, List, Optional, Sequence, Tuple, Type, TypeVar, Text, Union
@@ -85,7 +86,9 @@ class Model(metaclass=MetaModel):
@classmethod
def get_throttle(cls): ...
@classmethod
def _get_attributes(cls) -> Dict[str, Any]: ...
def get_attributes(cls) -> Dict[str, Attribute]: ...
@classmethod
def _get_attributes(cls) -> Dict[str, Attribute]: ...
class ModelContextManager(Generic[_T]):
model: Type[_T]