Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/zope/interface/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/zope/interface/__pycache__/exceptions.cpython-310.pyc
o

$
x`�!�@s�dZgd�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�Z	Gdd�de
�ZdS)zInterface-specific exceptions
)�Invalid�DoesNotImplement�BrokenImplementation�BrokenMethodImplementation�MultipleInvalid�
BadImplements�InvalidInterfacec@�eZdZdZdS)rz A specification is violated
    N��__name__�
__module__�__qualname__�__doc__�rr�;/usr/lib/python3/dist-packages/zope/interface/exceptions.pyr�rc@sjeZdZdZdZeZdZddd�Ze	dd��Z
e	d	d
��Ze	dd��Ze	d
d��Z
dZdZdZdd�ZdS)�_TargetInvalid��z<Not Given>NcCs&z|j|WS|jy|YSw�N)�args�_NOT_GIVEN_CATCH)�self�ix�defaultrrr�_get_arg_or_default8s
�z"_TargetInvalid._get_arg_or_defaultcCs|�|j�Sr)r�
_IX_INTERFACE�rrrr�	interface>sz_TargetInvalid.interfacecCs|�|j|j�Sr)r�
_IX_TARGET�
_NOT_GIVENrrrr�targetBsz_TargetInvalid.targetcCs|j}||jur
dSd|fS)Nz	An objectz
The object %r)r r)rr rrr�_str_subjectZs

z_TargetInvalid._str_subjectcCsd|jpdS)Nz$has failed to implement interface %sz	<Unknown>)rrrrr�_str_descriptionas�z_TargetInvalid._str_descriptionz: z	<unknown>�.cCsd|j|j|j|j|jfS)Nz%s %s%s%s%s)r!r"�_str_conjunction�_str_details�_str_trailerrrrr�__str__ks�z_TargetInvalid.__str__r)r
rrrr�
IndexErrorrrr�propertyrr r!r"r$r%r&r'rrrrr"s$




rc@seZdZdZdZdS)ra
    DoesNotImplement(interface[, target])

    The *target* (optional) does not implement the *interface*.

    .. versionchanged:: 5.0.0
       Add the *target* argument and attribute, and change the resulting
       string value of this object accordingly.
    z.Does not declaratively implement the interfaceN)r
rrr
r%rrrrrus
rc@s:eZdZdZejdZedZedd��Z	edd��Z
dS)ra[
    BrokenImplementation(interface, name[, target])

    The *target* (optional) is missing the attribute *name*.

    .. versionchanged:: 5.0.0
       Add the *target* argument and attribute, and change the resulting
       string value of this object accordingly.

       The *name* can either be a simple string or a ``Attribute`` object.
    rcC�
|jdS�Nr�rrrrr�name��
zBrokenImplementation.namecCs"dt|jt�r
t|j�S|jS)Nz!The %s attribute was not provided)�
isinstancer-�str�reprrrrrr%�s
��z!BrokenImplementation._str_detailsN)r
rrr
rr�_IX_NAMErr)r-r%rrrrr�s

rc@sTeZdZdZdZedZedZedd��Zedd��Z	e
dd	��Zed
d��ZdS)
ra�
    BrokenMethodImplementation(method, message[, implementation, interface, target])

    The *target* (optional) has a *method* in *implementation* that violates
    its contract in a way described by *mess*.

    .. versionchanged:: 5.0.0
       Add the *interface* and *target* argument and attribute,
       and change the resulting string value of this object accordingly.

       The *method* can either be a simple string or a ``Method`` object.

    .. versionchanged:: 5.0.0
       If *implementation* is given, then the *message* will have the
       string "implementation" replaced with an short but informative
       representation of *implementation*.

    �rcCr*)Nrr,rrrr�method�r.z!BrokenMethodImplementation.methodcCr*r+r,rrrr�mess�r.zBrokenMethodImplementation.messc	s�ddl}z|j}t}Wnty |j}|j��fdd�}Ynwz||�}Wnttfy6t|�YSwz|j	}WntyH|j
}Ynw|||�S)Nrcs�|�Srr)�sig��frr�<lambda>�szABrokenMethodImplementation.__implementation_str.<locals>.<lambda>)�inspect�	signaturer0�AttributeError�
getargspec�
formatargspec�
ValueError�	TypeErrorr1rr
)�implr:r6�	formatsigr-rr7r�__implementation_str�s(��

�z/BrokenMethodImplementation.__implementation_strcCsn|�|j|j�}|j}||jur"d|vr"|�dd�}||�|�f}dt|jt�r1t	|j�|fS|j|fS)N�implementationz%rz)The contract of %s is violated because %s)
r�_IX_IMPLrr5�replace�/_BrokenMethodImplementation__implementation_strr/r4r0r1)rrA�messagerrrr%�s��z'BrokenMethodImplementation._str_detailsN)
r
rrr
rErrr)r4r5�staticmethodrGr%rrrrr�s


rcsDeZdZdZdZ�fdd�Zedd��Zedd��Zd	Z	d
Z
�ZS)rz�
    The *target* has failed to implement the *interface* in
    multiple ways.

    The failures are described by *exceptions*, a collection of
    other `Invalid` instances.

    .. versionadded:: 5.0
    rcstt|��||t|��dSr)�superr�__init__�tuple)rrr �
exceptions��	__class__rrrK�szMultipleInvalid.__init__cCr*)Nr3r,rrrrrM�r.zMultipleInvalid.exceptionscCsdd�dd�|jD��S)Nz
    css,�|]}t|t�r|j��nt|�VqdSr)r/rr%�stripr0)�.0�xrrr�	<genexpr>s
��
�z/MultipleInvalid._str_details.<locals>.<genexpr>)�joinrMrrrrr%�s
�zMultipleInvalid._str_details�:�)r
rrr
rrKr)rMr%r$r&�
__classcell__rrrNrr�s


rc@r)rz'The interface has invalid contents
    Nr	rrrrr
rrc@r)rz�An implementation assertion is invalid

    because it doesn't contain an interface or a sequence of valid
    implementation assertions.
    Nr	rrrrrrrN)r
�__all__�	Exceptionrrrrrrrr@rrrrr�<module>s
SK!

Spamworldpro Mini