$19 GRAYBYTE WORDPRESS FILE MANAGER $94

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.162.162 | ADMIN IP 216.73.217.100
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/attr/__pycache__/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/attr/__pycache__//converters.cpython-311.pyc
�

�|oi��R�dZddlZddlmZddlmZmZmZgd�Zd�Z	edfd�Z
d	�ZdS)
z
Commonly useful converters.
�N�)�_AnnotationExtractor)�NOTHING�Factory�pipe)�default_if_none�optionalr�to_boolc�����fd�}t���}|���}|rtj||jd<|���}|rtj||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�"��|�dS�|��S�N�)�val�	converters ��F/opt/cloudlinux/venv/lib64/python3.11/site-packages/attr/converters.py�optional_converterz$optional.<locals>.optional_converter$s����;��4��y��~�~��r�return)r�get_first_param_type�typing�Optional�__annotations__�get_return_type)rr�xtr�t�rts`    rr	r	s���������
�y�
)�
)�C�� � �"�"�A��G�4:�O�A�4F��*�5�1�	�	�	�	�	�B�	�K�7=��r�7J��*�8�4��rc����tur|�td����tur|�td���|�t|���t�t��r�jrtd����fd�}n�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
    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.c�4��|�|S����Sr
)�factory�r�defaults �r�default_if_none_converterz2default_if_none.<locals>.default_if_none_converterYs������
��?�?�$�$�$rc���|�|S�Sr
rr s �rr"z2default_if_none.<locals>.default_if_none_converteras������
��Nr)r�	TypeErrorr�
isinstance�
takes_self�
ValueError)r!rr"s`  rrr6s����$�'���g�o��B�C�C�C��g���'�"5��C�
�
�	
����'�"�"���'�7�#�#����	��C���
�	%�	%�	%�	%�	%�	%�	�	�	�	�	�%�$rc���t|t��r|���}hd�}hd�}	||vrdS||vrdSn#t$rYnwxYwt	d|�����)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�falseTFzCannot convert value to bool: )r%�str�lowerr$r')r�truthy�falsys   rr
r
js���4�#�s�����i�i�k�k��
:�
:�
:�F�;�;�;�E�
��&�=�=��4��%�<�<��5����
�
�
���
�����;�c�;�;�
<�
<�<s�A�A�
A
�A
)�__doc__r�_compatr�_makerrr�__all__r	rr
rrr�<module>r<s�����
�
�
�
�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)��������@$�T�1%�1%�1%�1%�h&=�&=�&=�&=�&=r


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
11 Feb 2026 9.30 AM
root / root
0755
__init__.cpython-311.pyc
4.222 KB
11 Feb 2026 9.32 AM
root / root
0644
_cmp.cpython-311.pyc
4.935 KB
11 Feb 2026 9.32 AM
root / root
0644
_compat.cpython-311.pyc
6.284 KB
11 Feb 2026 9.32 AM
root / root
0644
_config.cpython-311.pyc
1.127 KB
11 Feb 2026 9.32 AM
root / root
0644
_funcs.cpython-311.pyc
16.148 KB
11 Feb 2026 9.32 AM
root / root
0644
_make.cpython-311.pyc
103.381 KB
11 Feb 2026 9.32 AM
root / root
0644
_next_gen.cpython-311.pyc
6.557 KB
11 Feb 2026 9.32 AM
root / root
0644
_version_info.cpython-311.pyc
3.521 KB
11 Feb 2026 9.32 AM
root / root
0644
converters.cpython-311.pyc
4.528 KB
11 Feb 2026 9.32 AM
root / root
0644
exceptions.cpython-311.pyc
3.859 KB
11 Feb 2026 9.32 AM
root / root
0644
filters.cpython-311.pyc
2.78 KB
11 Feb 2026 9.32 AM
root / root
0644
setters.cpython-311.pyc
1.867 KB
11 Feb 2026 9.32 AM
root / root
0644
validators.cpython-311.pyc
27.94 KB
11 Feb 2026 9.32 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF