annotate mercurial/thirdparty/attr/converters.pyi @ 51834:454feddab720
default tip
brancing: merge stable into default
author |
Pierre-Yves David <pierre-yves.david@octobus.net> |
date |
Fri, 06 Sep 2024 02:12:19 +0200 |
parents |
e1c586b9a43c |
children |
|
rev |
line source |
49643
|
1 from typing import Callable, Optional, TypeVar, overload
|
|
2
|
|
3 from . import _ConverterType
|
|
4
|
|
5 _T = TypeVar("_T")
|
|
6
|
|
7 def pipe(*validators: _ConverterType) -> _ConverterType: ...
|
|
8 def optional(converter: _ConverterType) -> _ConverterType: ...
|
|
9 @overload
|
|
10 def default_if_none(default: _T) -> _ConverterType: ...
|
|
11 @overload
|
|
12 def default_if_none(*, factory: Callable[[], _T]) -> _ConverterType: ...
|
|
13 def to_bool(val: str) -> bool: ...
|