Файловый менеджер - Редактировать - /home/beautybuzzbeyond/public_html/private/__init__.pyi.tar
Назад
var/opt/nydus/ops/attrs/__init__.pyi 0000644 00000017027 14720537017 0013535 0 ustar 00 import sys from typing import ( Any, Callable, Mapping, Sequence, overload, TypeVar, ) # Because we need to type our own stuff, we have to make everything from # attr explicitly public too. from attr import __author__ as __author__ from attr import __copyright__ as __copyright__ from attr import __description__ as __description__ from attr import __email__ as __email__ from attr import __license__ as __license__ from attr import __title__ as __title__ from attr import __url__ as __url__ from attr import __version__ as __version__ from attr import __version_info__ as __version_info__ from attr import assoc as assoc from attr import Attribute as Attribute from attr import AttrsInstance as AttrsInstance from attr import cmp_using as cmp_using from attr import converters as converters from attr import Converter as Converter from attr import evolve as evolve from attr import exceptions as exceptions from attr import Factory as Factory from attr import fields as fields from attr import fields_dict as fields_dict from attr import filters as filters from attr import has as has from attr import make_class as make_class from attr import NOTHING as NOTHING from attr import resolve_types as resolve_types from attr import setters as setters from attr import validate as validate from attr import validators as validators from attr import attrib, asdict as asdict, astuple as astuple if sys.version_info >= (3, 11): from typing import dataclass_transform else: from typing_extensions import dataclass_transform _T = TypeVar("_T") _C = TypeVar("_C", bound=type) _EqOrderType = bool | Callable[[Any], Any] _ValidatorType = Callable[[Any, "Attribute[_T]", _T], Any] _ConverterType = Callable[[Any], Any] _ReprType = Callable[[Any], str] _ReprArgType = bool | _ReprType _OnSetAttrType = Callable[[Any, "Attribute[Any]", Any], Any] _OnSetAttrArgType = _OnSetAttrType | list[_OnSetAttrType] | setters._NoOpType _FieldTransformer = Callable[ [type, list["Attribute[Any]"]], list["Attribute[Any]"] ] # FIXME: in reality, if multiple validators are passed they must be in a list # or tuple, but those are invariant and so would prevent subtypes of # _ValidatorType from working when passed in a list or tuple. _ValidatorArgType = _ValidatorType[_T] | Sequence[_ValidatorType[_T]] @overload def field( *, default: None = ..., validator: None = ..., repr: _ReprArgType = ..., hash: bool | None = ..., init: bool = ..., metadata: Mapping[Any, Any] | None = ..., converter: None = ..., factory: None = ..., kw_only: bool = ..., eq: bool | None = ..., order: bool | None = ..., on_setattr: _OnSetAttrArgType | None = ..., alias: str | None = ..., type: type | None = ..., ) -> Any: ... # This form catches an explicit None or no default and infers the type from the # other arguments. @overload def field( *, default: None = ..., validator: _ValidatorArgType[_T] | None = ..., repr: _ReprArgType = ..., hash: bool | None = ..., init: bool = ..., metadata: Mapping[Any, Any] | None = ..., converter: _ConverterType | Converter[Any, _T] | None = ..., factory: Callable[[], _T] | None = ..., kw_only: bool = ..., eq: _EqOrderType | None = ..., order: _EqOrderType | None = ..., on_setattr: _OnSetAttrArgType | None = ..., alias: str | None = ..., type: type | None = ..., ) -> _T: ... # This form catches an explicit default argument. @overload def field( *, default: _T, validator: _ValidatorArgType[_T] | None = ..., repr: _ReprArgType = ..., hash: bool | None = ..., init: bool = ..., metadata: Mapping[Any, Any] | None = ..., converter: _ConverterType | Converter[Any, _T] | None = ..., factory: Callable[[], _T] | None = ..., kw_only: bool = ..., eq: _EqOrderType | None = ..., order: _EqOrderType | None = ..., on_setattr: _OnSetAttrArgType | None = ..., alias: str | None = ..., type: type | None = ..., ) -> _T: ... # This form covers type=non-Type: e.g. forward references (str), Any @overload def field( *, default: _T | None = ..., validator: _ValidatorArgType[_T] | None = ..., repr: _ReprArgType = ..., hash: bool | None = ..., init: bool = ..., metadata: Mapping[Any, Any] | None = ..., converter: _ConverterType | Converter[Any, _T] | None = ..., factory: Callable[[], _T] | None = ..., kw_only: bool = ..., eq: _EqOrderType | None = ..., order: _EqOrderType | None = ..., on_setattr: _OnSetAttrArgType | None = ..., alias: str | None = ..., type: type | None = ..., ) -> Any: ... @overload @dataclass_transform(field_specifiers=(attrib, field)) def define( maybe_cls: _C, *, these: dict[str, Any] | None = ..., repr: bool = ..., unsafe_hash: bool | None = ..., hash: bool | None = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., eq: bool | None = ..., order: bool | None = ..., auto_detect: bool = ..., getstate_setstate: bool | None = ..., on_setattr: _OnSetAttrArgType | None = ..., field_transformer: _FieldTransformer | None = ..., match_args: bool = ..., ) -> _C: ... @overload @dataclass_transform(field_specifiers=(attrib, field)) def define( maybe_cls: None = ..., *, these: dict[str, Any] | None = ..., repr: bool = ..., unsafe_hash: bool | None = ..., hash: bool | None = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., eq: bool | None = ..., order: bool | None = ..., auto_detect: bool = ..., getstate_setstate: bool | None = ..., on_setattr: _OnSetAttrArgType | None = ..., field_transformer: _FieldTransformer | None = ..., match_args: bool = ..., ) -> Callable[[_C], _C]: ... mutable = define @overload @dataclass_transform(frozen_default=True, field_specifiers=(attrib, field)) def frozen( maybe_cls: _C, *, these: dict[str, Any] | None = ..., repr: bool = ..., unsafe_hash: bool | None = ..., hash: bool | None = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., eq: bool | None = ..., order: bool | None = ..., auto_detect: bool = ..., getstate_setstate: bool | None = ..., on_setattr: _OnSetAttrArgType | None = ..., field_transformer: _FieldTransformer | None = ..., match_args: bool = ..., ) -> _C: ... @overload @dataclass_transform(frozen_default=True, field_specifiers=(attrib, field)) def frozen( maybe_cls: None = ..., *, these: dict[str, Any] | None = ..., repr: bool = ..., unsafe_hash: bool | None = ..., hash: bool | None = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., eq: bool | None = ..., order: bool | None = ..., auto_detect: bool = ..., getstate_setstate: bool | None = ..., on_setattr: _OnSetAttrArgType | None = ..., field_transformer: _FieldTransformer | None = ..., match_args: bool = ..., ) -> Callable[[_C], _C]: ... var/opt/nydus/ops/attr/__init__.pyi 0000644 00000026252 14720540466 0013354 0 ustar 00 import enum import sys from typing import ( Any, Callable, Generic, Mapping, Protocol, Sequence, TypeVar, overload, ) # `import X as X` is required to make these public from . import converters as converters from . import exceptions as exceptions from . import filters as filters from . import setters as setters from . import validators as validators from ._cmp import cmp_using as cmp_using from ._typing_compat import AttrsInstance_ from ._version_info import VersionInfo from attrs import ( define as define, field as field, mutable as mutable, frozen as frozen, _EqOrderType, _ValidatorType, _ConverterType, _ReprArgType, _OnSetAttrType, _OnSetAttrArgType, _FieldTransformer, _ValidatorArgType, ) if sys.version_info >= (3, 10): from typing import TypeGuard else: from typing_extensions import TypeGuard if sys.version_info >= (3, 11): from typing import dataclass_transform else: from typing_extensions import dataclass_transform __version__: str __version_info__: VersionInfo __title__: str __description__: str __url__: str __uri__: str __author__: str __email__: str __license__: str __copyright__: str _T = TypeVar("_T") _C = TypeVar("_C", bound=type) _FilterType = Callable[["Attribute[_T]", _T], bool] # We subclass this here to keep the protocol's qualified name clean. class AttrsInstance(AttrsInstance_, Protocol): pass _A = TypeVar("_A", bound=type[AttrsInstance]) class _Nothing(enum.Enum): NOTHING = enum.auto() NOTHING = _Nothing.NOTHING # NOTE: Factory lies about its return type to make this possible: # `x: List[int] # = Factory(list)` # Work around mypy issue #4554 in the common case by using an overload. if sys.version_info >= (3, 8): from typing import Literal @overload def Factory(factory: Callable[[], _T]) -> _T: ... @overload def Factory( factory: Callable[[Any], _T], takes_self: Literal[True], ) -> _T: ... @overload def Factory( factory: Callable[[], _T], takes_self: Literal[False], ) -> _T: ... else: @overload def Factory(factory: Callable[[], _T]) -> _T: ... @overload def Factory( factory: Union[Callable[[Any], _T], Callable[[], _T]], takes_self: bool = ..., ) -> _T: ... In = TypeVar("In") Out = TypeVar("Out") class Converter(Generic[In, Out]): @overload def __init__(self, converter: Callable[[In], Out]) -> None: ... @overload def __init__( self, converter: Callable[[In, AttrsInstance, Attribute], Out], *, takes_self: Literal[True], takes_field: Literal[True], ) -> None: ... @overload def __init__( self, converter: Callable[[In, Attribute], Out], *, takes_field: Literal[True], ) -> None: ... @overload def __init__( self, converter: Callable[[In, AttrsInstance], Out], *, takes_self: Literal[True], ) -> None: ... class Attribute(Generic[_T]): name: str default: _T | None validator: _ValidatorType[_T] | None repr: _ReprArgType cmp: _EqOrderType eq: _EqOrderType order: _EqOrderType hash: bool | None init: bool converter: _ConverterType | Converter[Any, _T] | None metadata: dict[Any, Any] type: type[_T] | None kw_only: bool on_setattr: _OnSetAttrType alias: str | None def evolve(self, **changes: Any) -> "Attribute[Any]": ... # NOTE: We had several choices for the annotation to use for type arg: # 1) Type[_T] # - Pros: Handles simple cases correctly # - Cons: Might produce less informative errors in the case of conflicting # TypeVars e.g. `attr.ib(default='bad', type=int)` # 2) Callable[..., _T] # - Pros: Better error messages than #1 for conflicting TypeVars # - Cons: Terrible error messages for validator checks. # e.g. attr.ib(type=int, validator=validate_str) # -> error: Cannot infer function type argument # 3) type (and do all of the work in the mypy plugin) # - Pros: Simple here, and we could customize the plugin with our own errors. # - Cons: Would need to write mypy plugin code to handle all the cases. # We chose option #1. # `attr` lies about its return type to make the following possible: # attr() -> Any # attr(8) -> int # attr(validator=<some callable>) -> Whatever the callable expects. # This makes this type of assignments possible: # x: int = attr(8) # # This form catches explicit None or no default but with no other arguments # returns Any. @overload def attrib( default: None = ..., validator: None = ..., repr: _ReprArgType = ..., cmp: _EqOrderType | None = ..., hash: bool | None = ..., init: bool = ..., metadata: Mapping[Any, Any] | None = ..., type: None = ..., converter: None = ..., factory: None = ..., kw_only: bool = ..., eq: _EqOrderType | None = ..., order: _EqOrderType | None = ..., on_setattr: _OnSetAttrArgType | None = ..., alias: str | None = ..., ) -> Any: ... # This form catches an explicit None or no default and infers the type from the # other arguments. @overload def attrib( default: None = ..., validator: _ValidatorArgType[_T] | None = ..., repr: _ReprArgType = ..., cmp: _EqOrderType | None = ..., hash: bool | None = ..., init: bool = ..., metadata: Mapping[Any, Any] | None = ..., type: type[_T] | None = ..., converter: _ConverterType | Converter[Any, _T] | None = ..., factory: Callable[[], _T] | None = ..., kw_only: bool = ..., eq: _EqOrderType | None = ..., order: _EqOrderType | None = ..., on_setattr: _OnSetAttrArgType | None = ..., alias: str | None = ..., ) -> _T: ... # This form catches an explicit default argument. @overload def attrib( default: _T, validator: _ValidatorArgType[_T] | None = ..., repr: _ReprArgType = ..., cmp: _EqOrderType | None = ..., hash: bool | None = ..., init: bool = ..., metadata: Mapping[Any, Any] | None = ..., type: type[_T] | None = ..., converter: _ConverterType | Converter[Any, _T] | None = ..., factory: Callable[[], _T] | None = ..., kw_only: bool = ..., eq: _EqOrderType | None = ..., order: _EqOrderType | None = ..., on_setattr: _OnSetAttrArgType | None = ..., alias: str | None = ..., ) -> _T: ... # This form covers type=non-Type: e.g. forward references (str), Any @overload def attrib( default: _T | None = ..., validator: _ValidatorArgType[_T] | None = ..., repr: _ReprArgType = ..., cmp: _EqOrderType | None = ..., hash: bool | None = ..., init: bool = ..., metadata: Mapping[Any, Any] | None = ..., type: object = ..., converter: _ConverterType | Converter[Any, _T] | None = ..., factory: Callable[[], _T] | None = ..., kw_only: bool = ..., eq: _EqOrderType | None = ..., order: _EqOrderType | None = ..., on_setattr: _OnSetAttrArgType | None = ..., alias: str | None = ..., ) -> Any: ... @overload @dataclass_transform(order_default=True, field_specifiers=(attrib, field)) def attrs( maybe_cls: _C, these: dict[str, Any] | None = ..., repr_ns: str | None = ..., repr: bool = ..., cmp: _EqOrderType | None = ..., hash: bool | None = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., eq: _EqOrderType | None = ..., order: _EqOrderType | None = ..., auto_detect: bool = ..., collect_by_mro: bool = ..., getstate_setstate: bool | None = ..., on_setattr: _OnSetAttrArgType | None = ..., field_transformer: _FieldTransformer | None = ..., match_args: bool = ..., unsafe_hash: bool | None = ..., ) -> _C: ... @overload @dataclass_transform(order_default=True, field_specifiers=(attrib, field)) def attrs( maybe_cls: None = ..., these: dict[str, Any] | None = ..., repr_ns: str | None = ..., repr: bool = ..., cmp: _EqOrderType | None = ..., hash: bool | None = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., eq: _EqOrderType | None = ..., order: _EqOrderType | None = ..., auto_detect: bool = ..., collect_by_mro: bool = ..., getstate_setstate: bool | None = ..., on_setattr: _OnSetAttrArgType | None = ..., field_transformer: _FieldTransformer | None = ..., match_args: bool = ..., unsafe_hash: bool | None = ..., ) -> Callable[[_C], _C]: ... def fields(cls: type[AttrsInstance]) -> Any: ... def fields_dict(cls: type[AttrsInstance]) -> dict[str, Attribute[Any]]: ... def validate(inst: AttrsInstance) -> None: ... def resolve_types( cls: _A, globalns: dict[str, Any] | None = ..., localns: dict[str, Any] | None = ..., attribs: list[Attribute[Any]] | None = ..., include_extras: bool = ..., ) -> _A: ... # TODO: add support for returning a proper attrs class from the mypy plugin # we use Any instead of _CountingAttr so that e.g. `make_class('Foo', # [attr.ib()])` is valid def make_class( name: str, attrs: list[str] | tuple[str, ...] | dict[str, Any], bases: tuple[type, ...] = ..., class_body: dict[str, Any] | None = ..., repr_ns: str | None = ..., repr: bool = ..., cmp: _EqOrderType | None = ..., hash: bool | None = ..., init: bool = ..., slots: bool = ..., frozen: bool = ..., weakref_slot: bool = ..., str: bool = ..., auto_attribs: bool = ..., kw_only: bool = ..., cache_hash: bool = ..., auto_exc: bool = ..., eq: _EqOrderType | None = ..., order: _EqOrderType | None = ..., collect_by_mro: bool = ..., on_setattr: _OnSetAttrArgType | None = ..., field_transformer: _FieldTransformer | None = ..., ) -> type: ... # _funcs -- # TODO: add support for returning TypedDict from the mypy plugin # FIXME: asdict/astuple do not honor their factory args. Waiting on one of # these: # https://github.com/python/mypy/issues/4236 # https://github.com/python/typing/issues/253 # XXX: remember to fix attrs.asdict/astuple too! def asdict( inst: AttrsInstance, recurse: bool = ..., filter: _FilterType[Any] | None = ..., dict_factory: type[Mapping[Any, Any]] = ..., retain_collection_types: bool = ..., value_serializer: Callable[[type, Attribute[Any], Any], Any] | None = ..., tuple_keys: bool | None = ..., ) -> dict[str, Any]: ... # TODO: add support for returning NamedTuple from the mypy plugin def astuple( inst: AttrsInstance, recurse: bool = ..., filter: _FilterType[Any] | None = ..., tuple_factory: type[Sequence[Any]] = ..., retain_collection_types: bool = ..., ) -> tuple[Any, ...]: ... def has(cls: type) -> TypeGuard[type[AttrsInstance]]: ... def assoc(inst: _T, **changes: Any) -> _T: ... def evolve(inst: _T, **changes: Any) -> _T: ... # _config -- def set_run_validators(run: bool) -> None: ... def get_run_validators() -> bool: ... # aliases -- s = attributes = attrs ib = attr = attrib dataclass = attrs # Technically, partial(attrs, auto_attribs=True) ;) var/opt/nydus/ops/rpds/__init__.pyi 0000644 00000005012 14720541735 0013341 0 ustar 00 from typing import ( ItemsView, Iterable, Iterator, KeysView, Mapping, TypeVar, ValuesView, ) _T = TypeVar("_T") _KT_co = TypeVar("_KT_co", covariant=True) _VT_co = TypeVar("_VT_co", covariant=True) _KU_co = TypeVar("_KU_co", covariant=True) _VU_co = TypeVar("_VU_co", covariant=True) class HashTrieMap(Mapping[_KT_co, _VT_co]): def __init__( self, value: Mapping[_KT_co, _VT_co] | Iterable[tuple[_KT_co, _VT_co]] = {}, **kwds: Mapping[_KT_co, _VT_co], ): ... def __getitem__(self, key: _KT_co) -> _VT_co: ... def __iter__(self) -> Iterator[_KT_co]: ... def __len__(self) -> int: ... def discard(self, key: _KT_co) -> HashTrieMap[_KT_co, _VT_co]: ... def items(self) -> ItemsView[_KT_co, _VT_co]: ... def keys(self) -> KeysView[_KT_co]: ... def values(self) -> ValuesView[_VT_co]: ... def remove(self, key: _KT_co) -> HashTrieMap[_KT_co, _VT_co]: ... def insert( self, key: _KT_co, val: _VT_co, ) -> HashTrieMap[_KT_co, _VT_co]: ... def update( self, *args: Mapping[_KU_co, _VU_co] | Iterable[tuple[_KU_co, _VU_co]], ) -> HashTrieMap[_KT_co | _KU_co, _VT_co | _VU_co]: ... @classmethod def convert( cls, value: Mapping[_KT_co, _VT_co] | Iterable[tuple[_KT_co, _VT_co]], ) -> HashTrieMap[_KT_co, _VT_co]: ... @classmethod def fromkeys( cls, keys: Iterable[_KT_co], value: _VT_co = None, ) -> HashTrieMap[_KT_co, _VT_co]: ... class HashTrieSet(frozenset[_T]): def __init__(self, value: Iterable[_T] = ()): ... def __iter__(self) -> Iterator[_T]: ... def __len__(self) -> int: ... def discard(self, value: _T) -> HashTrieSet[_T]: ... def remove(self, value: _T) -> HashTrieSet[_T]: ... def insert(self, value: _T) -> HashTrieSet[_T]: ... def update(self, *args: Iterable[_T]) -> HashTrieSet[_T]: ... class List(Iterable[_T]): def __init__(self, value: Iterable[_T] = (), *more: _T): ... def __iter__(self) -> Iterator[_T]: ... def __len__(self) -> int: ... def push_front(self, value: _T) -> List[_T]: ... def drop_first(self) -> List[_T]: ... class Queue(Iterable[_T]): def __init__(self, value: Iterable[_T] = (), *more: _T): ... def __iter__(self) -> Iterator[_T]: ... def __len__(self) -> int: ... def enqueue(self, value: _T) -> Queue[_T]: ... def dequeue(self, value: _T) -> Queue[_T]: ... @property def is_empty(self) -> _T: ... @property def peek(self) -> _T: ...
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка