ok
Direktori : /lib64/python3.6/site-packages/zope/interface/__pycache__/ |
Current File : //lib64/python3.6/site-packages/zope/interface/__pycache__/verify.cpython-36.pyc |
3 ��[! � @ s| d Z ddlmZmZ ddlmZ ddlmZmZ ddlm Z m Z mZ ddlZefZ ddd�Zdd d �Zddd�Zd d� ZdS )z!Verify interface implementations � )�BrokenImplementation�DoesNotImplement)�BrokenMethodImplementation)�FunctionType� MethodType)� fromMethod�fromFunction�MethodNc C sh |dkr| j }n| j}| r.||� r.t| ���x2| jd�D �]"\}}yt||�}W n4 tk r� t|t� rz|dkrzw<t| |��Y nX t|t�s�q<t|t �r�t jd dkr�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<W dS ) 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 zNot a methodT)Z implementedByZ providedByr ZnamesAndDescriptions�getattr�AttributeError� isinstancer r r �sys�version_info�typer �MethodTypes�__func__r �property�callabler ZgetSignatureInfo� _incompat) �iface� candidate� tentative�vtypeZtesterr Zdesc�attr�methZmess� r �/usr/lib64/python3.6/verify.py�_verify sB r! c C s t | ||dd�S )Nr )r )r! )r r r r r r �verifyClassh s r"