|
| 1 | +from typing import Sequence, Callable, Union, Any, Optional, AnyStr, TypeVar, Type |
| 2 | + |
| 3 | +def with_repr(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ... |
| 4 | +def with_cmp(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ... |
| 5 | +def with_init(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ... |
| 6 | +def immutable(attrs: Sequence[Union[AnyStr, Attribute]]) -> Callable[..., Any]: ... |
| 7 | + |
| 8 | +def strip_leading_underscores(attribute_name: AnyStr) -> AnyStr: ... |
| 9 | + |
| 10 | +NOTHING = Any |
| 11 | + |
| 12 | +T = TypeVar('T') |
| 13 | + |
| 14 | +def attributes( |
| 15 | + attrs: Sequence[Union[AnyStr, Attribute]], |
| 16 | + apply_with_cmp: bool = True, |
| 17 | + apply_with_init: bool = True, |
| 18 | + apply_with_repr: bool = True, |
| 19 | + apply_immutable: bool = False, |
| 20 | + store_attributes: Optional[Callable[[type, Attribute], Any]] = None, |
| 21 | + **kw: Optional[dict]) -> Callable[[Type[T]], Type[T]]: ... |
| 22 | + |
| 23 | +class Attribute: |
| 24 | + def __init__( |
| 25 | + self, |
| 26 | + name: AnyStr, |
| 27 | + exclude_from_cmp: bool = False, |
| 28 | + exclude_from_init: bool = False, |
| 29 | + exclude_from_repr: bool = False, |
| 30 | + exclude_from_immutable: bool = False, |
| 31 | + default_value: Any = NOTHING, |
| 32 | + default_factory: Optional[Callable[[None], Any]] = None, |
| 33 | + instance_of: Optional[Any] = None, |
| 34 | + init_aliaser: Optional[Callable[[AnyStr], AnyStr]] = strip_leading_underscores) -> None: ... |
0 commit comments