Ë Û½UÏÒ_ÏãóP—dZddlZddlmZddlmZmZmZgd¢Zd„Z edfd„Z d „Z y) z Commonly useful converters. éNé)Ú_AnnotationExtractor)ÚNOTHINGÚFactoryÚpipe)Údefault_if_noneÚoptionalrÚto_boolcóð‡—ˆfd„}t‰«}|j«}|r tj||jd<|j «}|r tj||jd<|S)aO A converter that allows an attribute to be optional. An optional attribute is one which can be set to ``None``. Type annotations will be inferred from the wrapped converter's, if it has any. :param callable converter: the converter that is used for non-``None`` values. .. versionadded:: 17.1.0 có•—|€y‰|«S©N©)ÚvalÚ converters €úHusr/lib/python3.12/site-packages/mercurial/thirdparty/attr/converters.pyÚoptional_converterz$optional..optional_converter$sø€Ø ˆ;ØÙ˜‹~ÐórÚreturn)rÚget_first_param_typeÚtypingÚOptionalÚ__annotations__Úget_return_type)rrÚxtrÚtÚrts` rr r spø€ôô ˜yÓ )€Cà × Ñ Ó"€AÙÜ4:·O±OÀAÑ4FÐ×*Ñ*¨5Ñ1à × Ñ Ó €BÙ Ü7=·±ÀrÑ7JÐ×*Ñ*¨8Ñ4à Ðrcó܇—‰tur |€ td«‚‰tur |� td«‚|� t|«Št‰t«r‰jr t d«‚ˆfd„}|Sˆfd„}|S)aœ A converter that allows to replace ``None`` values by *default* or the result of *factory*. :param default: Value to be used if ``None`` is passed. Passing an instance of `attrs.Factory` is supported, however the ``takes_self`` option is *not*. :param callable factory: A callable that takes no parameters whose result is used if ``None`` is passed. :raises TypeError: If **neither** *default* or *factory* is passed. :raises TypeError: If **both** *default* and *factory* are passed. :raises ValueError: If an instance of `attrs.Factory` is passed with ``takes_self=True``. .. versionadded:: 18.2.0 z(Must pass either `default` or `factory`.z5Must pass either `default` or `factory` but not both.z1`takes_self` is not supported by default_if_none.có,•—|�|S‰j«Sr )Úfactory©rÚdefaults €rÚdefault_if_none_converterz2default_if_none..default_if_none_converterYsø€ØˆØ� à—?‘?Ó$Ð $rcó•—|�|S‰Sr rr s €rr"z2default_if_none..default_if_none_converterasø€ØˆØ� àˆNr)rÚ TypeErrorrÚ isinstanceÚ takes_selfÚ ValueError)r!rr"s` rrr6s‰ø€ð$”'јg˜oÜÐBÓCÐCà”gÑ 'Ð"5ÜØ Có ð ðÐܘ'Ó"ˆä�'œ7Ô#Ø × Ò ÜØCóð ô %ð %Ð$ô  ð %Ð$rcó¼—t|t«r|j«}hd£}hd£} ||vry||vry t dj |««‚#t$rYŒ%wxYw)a Convert "boolean" strings (e.g., from env. vars.) to real booleans. Values mapping to :code:`True`: - :code:`True` - :code:`"true"` / :code:`"t"` - :code:`"yes"` / :code:`"y"` - :code:`"on"` - :code:`"1"` - :code:`1` Values mapping to :code:`False`: - :code:`False` - :code:`"false"` / :code:`"f"` - :code:`"no"` / :code:`"n"` - :code:`"off"` - :code:`"0"` - :code:`0` :raises ValueError: for any other value. .. versionadded:: 21.3.0 >TÚ1rÚyÚonÚyesÚtrue>FÚ0ÚfÚnÚnoÚoffÚfalseTFz Cannot convert value to bool: {})r%ÚstrÚlowerr$r'Úformat)rÚtruthyÚfalsys rr r jsn€ô4�#”sÔØ�i‰i‹kˆÚ :€FÚ ;€Eð Ø �&‰=ØØ �%‰<Øð ô Ð7×>Ñ>¸sÓCÓ DÐDøô ò á ð úsªA¯AÁ AÁA) Ú__doc__rÚ_compatrÚ_makerrrÚ__all__r rr rrrÚr=s8ðñó å)ß)Ñ)ò €òð@$¨Tó1%óh&Er