You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
528 B

4 years ago
  1. from typing import Container, List, Union, TypeVar, Type, Any, Optional, Tuple
  2. from . import _ValidatorType
  3. _T = TypeVar("_T")
  4. def instance_of(
  5. type: Union[Tuple[Type[_T], ...], Type[_T]]
  6. ) -> _ValidatorType[_T]: ...
  7. def provides(interface: Any) -> _ValidatorType[Any]: ...
  8. def optional(
  9. validator: Union[_ValidatorType[_T], List[_ValidatorType[_T]]]
  10. ) -> _ValidatorType[Optional[_T]]: ...
  11. def in_(options: Container[_T]) -> _ValidatorType[_T]: ...
  12. def and_(*validators: _ValidatorType[_T]) -> _ValidatorType[_T]: ...