PHP 8.2.30
Preview: validators.pyi Size: 1.83 KB
/opt/alt/python37/lib/python3.7/site-packages/attr/validators.pyi

from typing import (
    Any,
    AnyStr,
    Callable,
    Container,
    Iterable,
    List,
    Mapping,
    Match,
    Optional,
    Tuple,
    Type,
    TypeVar,
    Union,
    overload,
)

from . import _ValidatorType


_T = TypeVar("_T")
_T1 = TypeVar("_T1")
_T2 = TypeVar("_T2")
_T3 = TypeVar("_T3")
_I = TypeVar("_I", bound=Iterable)
_K = TypeVar("_K")
_V = TypeVar("_V")
_M = TypeVar("_M", bound=Mapping)

# To be more precise on instance_of use some overloads.
# If there are more than 3 items in the tuple then we fall back to Any
@overload
def instance_of(type: Type[_T]) -> _ValidatorType[_T]: ...
@overload
def instance_of(type: Tuple[Type[_T]]) -> _ValidatorType[_T]: ...
@overload
def instance_of(
    type: Tuple[Type[_T1], Type[_T2]]
) -> _ValidatorType[Union[_T1, _T2]]: ...
@overload
def instance_of(
    type: Tuple[Type[_T1], Type[_T2], Type[_T3]]
) -> _ValidatorType[Union[_T1, _T2, _T3]]: ...
@overload
def instance_of(type: Tuple[type, ...]) -> _ValidatorType[Any]: ...
def provides(interface: Any) -> _ValidatorType[Any]: ...
def optional(
    validator: Union[_ValidatorType[_T], List[_ValidatorType[_T]]]
) -> _ValidatorType[Optional[_T]]: ...
def in_(options: Container[_T]) -> _ValidatorType[_T]: ...
def and_(*validators: _ValidatorType[_T]) -> _ValidatorType[_T]: ...
def matches_re(
    regex: AnyStr,
    flags: int = ...,
    func: Optional[
        Callable[[AnyStr, AnyStr, int], Optional[Match[AnyStr]]]
    ] = ...,
) -> _ValidatorType[AnyStr]: ...
def deep_iterable(
    member_validator: _ValidatorType[_T],
    iterable_validator: Optional[_ValidatorType[_I]] = ...,
) -> _ValidatorType[_I]: ...
def deep_mapping(
    key_validator: _ValidatorType[_K],
    value_validator: _ValidatorType[_V],
    mapping_validator: Optional[_ValidatorType[_M]] = ...,
) -> _ValidatorType[_M]: ...
def is_callable() -> _ValidatorType[_T]: ...

Directory Contents

Dirs: 1 × Files: 22

Name Size Perms Modified Actions
- drwxr-xr-x 2024-03-03 23:11:35
Edit Download
2.97 KB lrw-r--r-- 2021-02-18 15:38:25
Edit Download
382 B lrw-r--r-- 2021-02-19 07:15:51
Edit Download
1.90 KB lrw-r--r-- 2021-04-30 12:38:44
Edit Download
540 B lrw-r--r-- 2021-02-19 07:15:51
Edit Download
1.07 KB lrw-r--r-- 2020-03-29 07:56:49
Edit Download
216 B lrw-r--r-- 2021-02-19 07:15:51
Edit Download
0 B lrw-r--r-- 2018-07-12 10:28:53
Edit Download
1.40 KB lrw-r--r-- 2020-07-20 10:43:42
Edit Download
574 B lrw-r--r-- 2021-04-06 04:14:02
Edit Download
11.23 KB lrw-r--r-- 2020-07-20 10:43:42
Edit Download
1.83 KB lrw-r--r-- 2021-02-19 07:15:51
Edit Download
4.04 KB lrw-r--r-- 2021-05-06 07:03:24
Edit Download
318 B lrw-r--r-- 2021-05-01 12:26:39
Edit Download
7.38 KB lrw-r--r-- 2021-02-27 09:49:47
Edit Download
514 B lrw-r--r-- 2019-10-17 08:29:00
Edit Download
13.08 KB lrw-r--r-- 2021-05-06 14:11:04
Edit Download
95.45 KB lrw-r--r-- 2021-05-05 08:05:42
Edit Download
3.98 KB lrw-r--r-- 2021-04-12 12:35:56
Edit Download
2.11 KB lrw-r--r-- 2020-03-29 07:56:49
Edit Download
209 B lrw-r--r-- 2020-03-29 07:56:49
Edit Download
1.58 KB lrw-r--r-- 2021-05-07 09:20:15
Edit Download
14.49 KB lrw-r--r-- 2021-05-05 08:25:16
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).