summaryrefslogtreecommitdiffstats
path: root/third_party/python/attrs/attr/converters.pyi
blob: 63b2a3866e31f8799a297c837c9307f760bbd439 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from typing import TypeVar, Optional, Callable, overload
from . import _ConverterType

_T = TypeVar("_T")

def optional(
    converter: _ConverterType[_T]
) -> _ConverterType[Optional[_T]]: ...
@overload
def default_if_none(default: _T) -> _ConverterType[_T]: ...
@overload
def default_if_none(*, factory: Callable[[], _T]) -> _ConverterType[_T]: ...