Spade
Mini Shell
| Directory:~$ /proc/self/root/usr/lib64/python2.7/site-packages/zope/interface/ |
| [Home] [System Details] [Kill Me] |
�
j�/Qc@s�dZddlmZmZddlmZddlmZmZddlm Z m
Z
mZddlZefZ
ddd�Zdd �Zdd
�Zd�ZdS(s!Verify interface implementations
i����(tBrokenImplementationtDoesNotImplement(tBrokenMethodImplementation(tFunctionTypet
MethodType(t
fromMethodtfromFunctiontMethodNic
Cs�|dkr|j}n |j}|rD||�rDt|��nx�|jd�D]�\}}yt||�}WnBtk
r�t|t�r�|dkr�qTnt||��nXt|t�s�qTnt|t �r4t
jddkrt|t�rt
||d|dd�}q�t
||d|�}n{t|t�rmt|j�t krmt|||�}nBt|t�r�|dkr�qTn!t|�sTt|d��qTqT|j�}|j�}t||�} | rTt|| ��qTqTWtS(s�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.
tciit3tnametimlevelsNot a method(t
implementedByt
providedByRtnamesAndDescriptionstgetattrtAttributeErrort
isinstanceRRRtsystversionttypeRtMethodTypest__func__RtpropertytcallableRtgetSignatureInfot _incompattTrue(
tifacet candidatet tentativetvtypettesterR
tdesctattrtmethtmess((s;/usr/lib64/python2.7/site-packages/zope/interface/verify.pyt_verifysB
"cCst|||dd�S(NRR(R%(RRR((s;/usr/lib64/python2.7/site-packages/zope/interface/verify.pytverifyClassescCst|||dd�S(NRto(R%(RRR((s;/usr/lib64/python2.7/site-packages/zope/interface/verify.pytverifyObjecthscCs�t|d�t|d�kr$dSt|d�t|d�krS|drSdS|drl|drldS|dr�|dr�dSdS( Ntrequireds*implementation
requires too many argumentst
positionaltvarargss-implementation doesn't allow enough
argumentstkwargss0implementation doesn't support keyword
argumentss1implementation doesn't support variable
arguments(tlen(R)timplemented((s;/usr/lib64/python2.7/site-packages/zope/interface/verify.pyRks
(t__doc__tzope.interface.exceptionsRRRttypesRRtzope.interface.interfaceRRRRRtNoneR%R&R(R(((s;/usr/lib64/python2.7/site-packages/zope/interface/verify.pyt<module>s J