shell bypass 403

Cubjrnet7 Shell


name : converters.cpython-39.opt-1.pyc
a

Pͣ_��@sNdZddlmZmZmZddlmZmZmZgd�Z	dd�Z
edfd	d
�ZdS)z
Commonly useful converters.
�)�absolute_import�division�print_function�)�NOTHING�Factory�pipe)r�optional�default_if_nonecs�fdd�}|S)z�
    A converter that allows an attribute to be optional. An optional attribute
    is one which can be set to ``None``.

    :param callable converter: the converter that is used for non-``None``
        values.

    .. versionadded:: 17.1.0
    cs|durdS�|�S�N���val��	converterr�3/usr/lib/python3.9/site-packages/attr/converters.py�optional_convertersz$optional.<locals>.optional_converterr)rrrrrr	sr	Ncsv�tur|durtd���tur0|dur0td��|dur@t|��t�t�rf�jrXtd���fdd�}n�fdd�}|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 `attr.Factory` is supported, however the ``takes_self`` option
       is *not*.
    :param callable factory: A callable that takes not 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 `attr.Factory` is passed with
       ``takes_self=True``.

    .. versionadded:: 18.2.0
    Nz(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.cs|dur|S���Sr)�factoryr
��defaultrr�default_if_none_converterGsz2default_if_none.<locals>.default_if_none_convertercs|dur|S�Srrr
rrrrOs)r�	TypeErrorr�
isinstanceZ
takes_self�
ValueError)rrrrrrr
$s �
�r
)�__doc__Z
__future__rrr�_makerrr�__all__r	r
rrrr�<module>s


© 2025 Cubjrnet7