HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /lib/python3/dist-packages/zope/interface/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/zope/interface/__pycache__/exceptions.cpython-311.pyc
�

JDvc�!����dZgd�ZGd�de��ZGd�de��ZGd�de��ZGd�d	e��ZGd
�de��ZGd�d
e��ZGd�de��Z	Gd�de
��ZdS)zInterface-specific exceptions
)�Invalid�DoesNotImplement�BrokenImplementation�BrokenMethodImplementation�MultipleInvalid�
BadImplements�InvalidInterfacec��eZdZdZdS)rz A specification is violated
    N��__name__�
__module__�__qualname__�__doc__���;/usr/lib/python3/dist-packages/zope/interface/exceptions.pyrr����������rrc��eZdZdZdZeZdZdd�Ze	d���Z
e	d���Ze	d���Ze	d	���Z
d
ZdZdZd
�ZdS)�_TargetInvalid��z<Not Given>Nc�B�	|j|S#|j$r|cYSwxYw�N)�args�_NOT_GIVEN_CATCH)�self�ix�defaults   r�_get_arg_or_defaultz"_TargetInvalid._get_arg_or_default8s:��	��9�R�=� ���$�	�	�	��N�N�N�	���s���c�6�|�|j��Sr)r�
_IX_INTERFACE�rs r�	interfacez_TargetInvalid.interface>s���'�'��(:�;�;�;rc�B�|�|j|j��Sr)r�
_IX_TARGET�
_NOT_GIVENr!s r�targetz_TargetInvalid.targetBs���'�'�����I�I�Irc�0�|j}||jurdSd|��S)Nz	An objectzThe object )r&r%)rr&s  r�_str_subjectz_TargetInvalid._str_subjectZs+������T�_�$�$��;�%�"(�&�*�*rc��d|jpdzS)Nz$has failed to implement interface %sz	<Unknown>)r"r!s r�_str_descriptionz_TargetInvalid._str_descriptionas��5��N�)�k�
�	
rz: z	<unknown>�.c�N�|j�d|j�|j�|j�|j��S)N� )r(r*�_str_conjunction�_str_details�_str_trailerr!s r�__str__z_TargetInvalid.__str__ks<�������!�!��!�!�������
�	
rr)rrr
r r$�
IndexErrorrr%r�propertyr"r&r(r*r.r/r0r1rrrrr"s��������M��J�"���J������<�<��X�<��J�J��X�J�.�+�+��X�+��
�
��X�
�
���L��L�
�
�
�
�
rrc��eZdZdZdZdS)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)rrr
rr/rrrrrus ��������D�L�L�Lrrc�\�eZdZdZejdzZedzZed���Z	ed���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.
    rc��|jdS�Nr�rr!s r�namezBrokenImplementation.name�����y��|�rc�r�dt|jt��rt|j��n|jzS)Nz!The %s attribute was not provided)�
isinstancer9�str�reprr!s rr/z!BrokenImplementation._str_details�s1��2�)�$�)�S�9�9�H�D���O�O�O�t�y�
�	
rN)rrr
rrr �_IX_NAMEr$r3r9r/rrrrr�sj������
�
��+�a�/�H��A��J�
����X���
�
��X�
�
�
rrc��eZdZdZdZedzZedzZed���Zed���Z	e
d���Zed���ZdS)	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*.

    �rc��|jdS)Nrr8r!s r�methodz!BrokenMethodImplementation.method�r:rc��|jdSr7r8r!s r�messzBrokenMethodImplementation.mess�r:rc�4��ddl}	|j}t}n##t$r|j}|j��fd�}YnwxYw	||��}n&#ttf$rt|��cYSwxYw	|j	}n#t$r
|j
}YnwxYw|||��zS)Nrc����|�Srr)�sig�fs �r�<lambda>zABrokenMethodImplementation.__implementation_str.<locals>.<lambda>�s
���A�A�s�G�r)�inspect�	signaturer=�AttributeError�
getargspec�
formatargspec�
ValueError�	TypeErrorr>r
r)�implrKrH�	formatsigr9rIs     @r�__implementation_strz/BrokenMethodImplementation.__implementation_str�s����	����	,��#�C��I�I���	,�	,�	,��$�C��%�A�+�+�+�+�I�I�I�	,����
	��#�d�)�)�C�C���I�&�	�	�	�
��:�:����	����	!��$�D�D���	!�	!�	!��=�D�D�D�	!�����i�i��n�n�$�$s/��6�6�A� A)�(A)�-A5�5B	�B	c�>�|�|j|j��}|j}||jur3d|vr/|�dd��}||�|��fz}dt
|jt��rt|j��n|j�d|��S)N�implementationz%rzThe contract of z is violated because )
r�_IX_IMPLr%rE�replace�/_BrokenMethodImplementation__implementation_strr<rCr=r>)rrR�messages   rr/z'BrokenMethodImplementation._str_details�s����'�'��
�t��G�G���)���t��&�&�+;�w�+F�+F��o�o�&6��=�=�G���!:�!:�4�!@�!@� B�B�G��",�D�K��!=�!=�N�D������4�;�N�N��G�
�	
rN)
rrr
rrWr r$r3rCrE�staticmethodrYr/rrrrr�s���������&�H��q�L�M���"�J�
����X������X���%�%��\�%�8�

�

��X�

�

�

rrc�Z��eZdZdZdZ�fd�Zed���Zed���ZdZ	dZ
�xZS)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
    rc�v��tt|���||t|����dSr)�superr�__init__�tuple)rr"r&�
exceptions�	__class__s    �rr_zMultipleInvalid.__init__�s3���
�o�t�$�$�-�-�i���z�AR�AR�S�S�S�S�Src��|jdS)NrAr8r!s rrazMultipleInvalid.exceptions�r:rc�P�dd�d�|jD����zS)Nz
    c3�K�|]A}t|t��r|j���nt	|��V��BdSr)r<rr/�stripr=)�.0�xs  r�	<genexpr>z/MultipleInvalid._str_details.<locals>.<genexpr>s^����(
�(
��'1��N�&C�&C�O�A�N� � �"�"�"��Q���(
�(
�(
�(
�(
�(
r)�joinrar!s rr/zMultipleInvalid._str_details�s?���(�-�-�(
�(
��_�(
�(
�(
�
�
�
�	
r�:�)rrr
rrr_r3rar/r.r0�
__classcell__)rbs@rrr�s������������T�T�T�T�T�����X���
�
��X�
����L�L�L�L�Lrrc��eZdZdZdS)rz'The interface has invalid contents
    Nr
rrrrr
rrrc��eZdZdZdS)rz�An implementation assertion is invalid

    because it doesn't contain an interface or a sequence of valid
    implementation assertions.
    Nr
rrrrrs���������rrN)r�__all__�	ExceptionrrrrrrrrQrrrr�<module>rrs�����
�
�
�������i����
P
�P
�P
�P
�P
�W�P
�P
�P
�fD�D�D�D�D�~�D�D�D�
�
�
�
�
�>�
�
�
�6H
�H
�H
�H
�H
��H
�H
�H
�V�����n����B�����y���������I�����r