aboutsummaryrefslogtreecommitdiffstats
path: root/python/attr/validators.pyi
blob: abbaedf10a400d90a9059f9633e708160d095a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from typing import Container, List, Union, TypeVar, Type, Any, Optional, Tuple
from . import _ValidatorType

_T = TypeVar("_T")

def instance_of(
    type: Union[Tuple[Type[_T], ...], Type[_T]]
) -> _ValidatorType[_T]: ...
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]: ...