HEX
Server: LiteSpeed
System: Linux linux31.centraldnserver.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: salamatk (1501)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: //lib64/python3.6/site-packages/zope/interface/__pycache__/verify.cpython-36.opt-1.pyc
3

��[!�@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
Csh|dkr|j}n|j}|r.||�r.t|���x2|jd�D�]"\}}yt||�}Wn4tk
r�t|t�rz|dkrzw<t||��YnXt|t�s�q<t|t	�r�t
jddkr�t|t�r�|dkr�t
|||dd�}nt
|||d�}nVt|t�o�t|j�t	k�r
t|||�}n.t|t��r$|dk�r$q<nt|�s<t|d��q<|j�}|j�}t||�}	|	r<t||	��q<WdS)	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�/usr/lib64/python3.6/verify.py�_verifysB

 



r!cCst|||dd�S)Nr
)r)r!)rrrrrr �verifyClasshsr"cCst|||dd�S)N�o)r)r!)rrrrrr �verifyObjectksr$cCsrt|d�t|d�krdSt|d�t|d�krB|drBdS|drX|drXdS|drn|drndSdS)	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