converters.pyi 406 B

12345678910111213
  1. from typing import Callable, TypeVar, overload
  2. from . import _ConverterType
  3. _T = TypeVar("_T")
  4. def pipe(*validators: _ConverterType) -> _ConverterType: ...
  5. def optional(converter: _ConverterType) -> _ConverterType: ...
  6. @overload
  7. def default_if_none(default: _T) -> _ConverterType: ...
  8. @overload
  9. def default_if_none(*, factory: Callable[[], _T]) -> _ConverterType: ...
  10. def to_bool(val: str) -> bool: ...