HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib/python3/dist-packages/zope/interface/__pycache__/verify.cpython-38.pyc
U

ؒ�]!�@s|dZddlmZmZddlmZddlmZmZddlm	Z	m
Z
mZddlZefZ
ddd�Zdd	d
�Zddd�Zd
d�ZdS)z!Verify interface implementations
�)�BrokenImplementation�DoesNotImplement)�BrokenMethodImplementation)�FunctionType�
MethodType)�
fromMethod�fromFunction�MethodNc
	Cs`|dkr|j}n|j}|s*||�s*t|��|�d�D�]$\}}zt||�}Wn4tk
r�t|t�sr|dkrrYq4t||��YnXt|t�s�q4t|t	�r�t
jddkr�t|t�r�|dkr�t
|||dd�}nt
|||d�}nXt|t��rt|j�t	k�rt|||�}n.t|t��r|dk�rq4nt|�s4t|d��q4|��}|��}t||�}	|	r4t||	��q4dS)	a�Verify that 'candidate' might correctly implements 'iface'.

    This involves:

      o Making sure the candidate defines all the necessary methods

      o Making sure the methods have the correct signature

      o Making sure the candidate asserts that it implements the interface

    Note that this isn't the same as verifying that the class does
    implement the interface.

    If optional tentative is true, suppress the "is implemented by" test.
    �c�r�)�nameZimlevel)r
zNot a methodT)Z
implementedByZ
providedByrZnamesAndDescriptions�getattr�AttributeError�
isinstancer	rr�sys�version_info�typer�MethodTypes�__func__r�property�callablerZgetSignatureInfo�	_incompat)
�iface�	candidate�	tentative�vtypeZtesterr
Zdesc�attr�methZmess�r�7/usr/lib/python3/dist-packages/zope/interface/verify.py�_verifysF

 ��

r!cCst|||dd�S)Nr
�r�r!�rrrrrr �verifyClasshsr%cCst|||dd�S)N�or"r#r$rrr �verifyObjectksr'cCslt|d�t|d�krdSt|d�t|d�kr@|ds@dS|drT|dsTdS|drh|dshdSdS)	N�requiredz*implementation requires too many argumentsZ
positionalZvarargsz-implementation doesn't allow enough arguments�kwargsz0implementation doesn't support keyword argumentsz1implementation doesn't support variable arguments)�len)r(Zimplementedrrr rns�r)rN)r)r)�__doc__Zzope.interface.exceptionsrrr�typesrrZzope.interface.interfacerrr	rrr!r%r'rrrrr �<module>s
M