403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.135.218.109
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python38/lib/python3.8/site-packages/attr/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python38/lib/python3.8/site-packages/attr/__pycache__/validators.cpython-38.opt-1.pyc
U

#IGZ`�@s�dZddlmZmZmZddlmZmZmZm	Z	ddddd	gZ
e	d
ddd�Gd
d�de��Zdd�Z
e	d
ddd�Gdd�de��Zdd	�Ze	d
ddd�Gdd�de��Zdd�Ze	d
ddd�Gdd�de��Zdd�ZdS)z
Commonly useful validators.
�)�absolute_import�division�print_function�)�
_AndValidator�and_�attrib�attrsr�in_�instance_of�optional�providesFT)�repr�slots�hashc@s"eZdZe�Zdd�Zdd�ZdS)�_InstanceOfValidatorcCs4t||j�s0tdj|j|j|j|d�||j|��dS)�P
        We use a callable class to be able to change the ``__repr__``.
        z?'{name}' must be {type!r} (got {value!r} that is a {actual!r}).)�name�typeZactual�valueN)�
isinstancer�	TypeError�formatr�	__class__��self�inst�attrr�r�@/opt/alt/python38/lib/python3.8/site-packages/attr/validators.py�__call__s��z_InstanceOfValidator.__call__cCsdj|jd�S)Nz)<instance_of validator for type {type!r}>�r)rr�rrrr�__repr__$s��z_InstanceOfValidator.__repr__N)�__name__�
__module__�__qualname__rrr r#rrrrrs
rcCst|�S)a�
    A validator that raises a :exc:`TypeError` if the initializer is called
    with a wrong type for this particular attribute (checks are performed using
    :func:`isinstance` therefore it's also valid to pass a tuple of types).

    :param type: The type to check for.
    :type type: type or tuple of types

    :raises TypeError: With a human readable error message, the attribute
        (of type :class:`attr.Attribute`), the expected type, and the value it
        got.
    )rr!rrrr+s
c@s"eZdZe�Zdd�Zdd�ZdS)�_ProvidesValidatorcCs0|j�|�s,tdj|j|j|d�||j|��dS)rz<'{name}' must provide {interface!r} which {value!r} doesn't.)r�	interfacerN)r(Z
providedByrrrrrrrr ?s��z_ProvidesValidator.__call__cCsdj|jd�S)Nz0<provides validator for interface {interface!r}>�r()rr(r"rrrr#Ks��z_ProvidesValidator.__repr__N)r$r%r&rr(r r#rrrrr';sr'cCst|�S)a
    A validator that raises a :exc:`TypeError` if the initializer is called
    with an object that does not provide the requested *interface* (checks are
    performed using ``interface.providedBy(value)`` (see `zope.interface
    <https://zopeinterface.readthedocs.io/en/latest/>`_).

    :param zope.interface.Interface interface: The interface to check for.

    :raises TypeError: With a human readable error message, the attribute
        (of type :class:`attr.Attribute`), the expected interface, and the
        value it got.
    )r'r)rrrr
Rs
c@s"eZdZe�Zdd�Zdd�ZdS)�_OptionalValidatorcCs|dkrdS|�|||�dS)N��	validatorrrrrr fsz_OptionalValidator.__call__cCsdjt|j�d�S)Nz'<optional validator for {what} or None>)Zwhat)rrr,r"rrrr#ls��z_OptionalValidator.__repr__N)r$r%r&rr,r r#rrrrr*bsr*cCst|t�rtt|��St|�S)a�
    A validator that makes an attribute optional.  An optional attribute is one
    which can be set to ``None`` in addition to satisfying the requirements of
    the sub-validator.

    :param validator: A validator (or a list of validators) that is used for
        non-``None`` values.
    :type validator: callable or :class:`list` of callables.

    .. versionadded:: 15.1.0
    .. versionchanged:: 17.1.0 *validator* can be a list of validators.
    )r�listr*rr+rrrrss
c@s"eZdZe�Zdd�Zdd�ZdS)�_InValidatorcCs&||jkr"tdj|j|j|d���dS)Nz/'{name}' must be in {options!r} (got {value!r}))r�optionsr)r/�
ValueErrorrrrrrrr �s
��z_InValidator.__call__cCsdj|jd�S)Nz(<in_ validator with options {options!r}>�r/)rr/r"rrrr#�s��z_InValidator.__repr__N)r$r%r&rr/r r#rrrrr.�sr.cCst|�S)a�
    A validator that raises a :exc:`ValueError` if the initializer is called
    with a value that does not belong in the options provided.  The check is
    performed using ``value in options``.

    :param options: Allowed options.
    :type options: list, tuple, :class:`enum.Enum`, ...

    :raises ValueError: With a human readable error message, the attribute (of
       type :class:`attr.Attribute`), the expected options, and the value it
       got.

    .. versionadded:: 17.1.0
    )r.r1rrrr
�sN)�__doc__Z
__future__rrr�_makerrrr	�__all__�objectrrr'r
r*rr.r
rrrr�<module>s(�	

Youez - 2016 - github.com/yon3zu
LinuXploit