[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.140.185.250: ~ $


#IGZ`�@sQdZddlmZmZmZddlmZmZmZm	Z	ddddd	gZ
e	d
ddd
dd
�Gdd�de��Zdd�Z
e	d
ddd
dd
�Gdd�de��Zdd	�Ze	d
ddd
dd
�Gdd�de��Zdd�Ze	d
ddd
dd
�Gdd�de��Zdd�ZdS)z
Commonly useful validators.
�)�absolute_import�division�print_function�)�
_AndValidator�and_�attrib�attrsr�in_�instance_of�optional�provides�reprF�slotsT�hashc@s1eZdZe�Zdd�Zdd�ZdS)�_InstanceOfValidatorc
CsUt||j�sQtdjd|jd|jd|jd|�||j|��dS)zP
        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�type�actual�valueN)�
isinstancer�	TypeError�formatr�	__class__)�self�inst�attrr�r�/validators.py�__call__s	z_InstanceOfValidator.__call__cCsdjd|j�S)Nz)<instance_of validator for type {type!r}>r)rr)rrrr�__repr__$s	z_InstanceOfValidator.__repr__N)�__name__�
__module__�__qualname__rrrr rrrrrs	
rcCs
t|�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.
    )r)rrrrr+s
c@s1eZdZe�Zdd�Zdd�ZdS)�_ProvidesValidatorcCsL|jj|�sHtdjd|jd|jd|�||j|��dS)zP
        We use a callable class to be able to change the ``__repr__``.
        z<'{name}' must provide {interface!r} which {value!r} doesn't.r�	interfacerN)r%Z
providedByrrr)rrrrrrrr?s
	z_ProvidesValidator.__call__cCsdjd|j�S)Nz0<provides validator for interface {interface!r}>r%)rr%)rrrrr Ks	z_ProvidesValidator.__repr__N)r!r"r#rr%rr rrrrr$;s	r$cCs
t|�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@s1eZdZe�Zdd�Zdd�ZdS)�_OptionalValidatorcCs'|dkrdS|j|||�dS)N)�	validator)rrrrrrrrfsz_OptionalValidator.__call__cCsdjdt|j��S)Nz'<optional validator for {what} or None>Zwhat)rrr')rrrrr ls	z_OptionalValidator.__repr__N)r!r"r#rr'rr rrrrr&bs	r&cCs)t|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&r)r'rrrrss
c@s1eZdZe�Zdd�Zdd�ZdS)�_InValidatorcCs=||jkr9tdjd|jd|jd|���dS)Nz/'{name}' must be in {options!r} (got {value!r})r�optionsr)r*�
ValueErrorrr)rrrrrrrr�s	z_InValidator.__call__cCsdjd|j�S)Nz(<in_ validator with options {options!r}>r*)rr*)rrrrr �s	z_InValidator.__repr__N)r!r"r#rr*rr rrrrr)�s	r)cCs
t|�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))r*rrrr
�sN)�__doc__Z
__future__rrr�_makerrrr	�__all__�objectrrr$r
r&rr)r
rrrr�<module>s&"	%%%%

Filemanager

Name Type Size Permission Actions
__init__.cpython-35.opt-1.pyc File 1.37 KB 0644
__init__.cpython-35.pyc File 1.37 KB 0644
_compat.cpython-35.opt-1.pyc File 4.38 KB 0644
_compat.cpython-35.pyc File 4.38 KB 0644
_config.cpython-35.opt-1.pyc File 693 B 0644
_config.cpython-35.pyc File 693 B 0644
_funcs.cpython-35.opt-1.pyc File 7.05 KB 0644
_funcs.cpython-35.pyc File 7.05 KB 0644
_make.cpython-35.opt-1.pyc File 43.37 KB 0644
_make.cpython-35.pyc File 43.37 KB 0644
converters.cpython-35.opt-1.pyc File 791 B 0644
converters.cpython-35.pyc File 791 B 0644
exceptions.cpython-35.opt-1.pyc File 1.83 KB 0644
exceptions.cpython-35.pyc File 1.83 KB 0644
filters.cpython-35.opt-1.pyc File 1.79 KB 0644
filters.cpython-35.pyc File 1.79 KB 0644
validators.cpython-35.opt-1.pyc File 5.75 KB 0644
validators.cpython-35.pyc File 5.75 KB 0644