ó
    Ï›‘hv  ã                   óî   • S r SSKrSSKrSSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SS	KJr  SS
KJr  SSKJr  SSKJr  SS/r\4rSS jrS rSS jrSS jr\R                   \l         SrS rg)z!Verify interface implementations
é    N)ÚFunctionType)Ú
MethodType)ÚBrokenImplementation)ÚBrokenMethodImplementation)ÚDoesNotImplement)ÚInvalid)ÚMultipleInvalid)ÚMethod)ÚfromFunction)Ú
fromMethodÚverifyObjectÚverifyClassc                 óŽ  • US:X  a  U R                   nOU R                  n/ nU(       d'  U" U5      (       d  UR                  [        X5      5        U R	                  SS9 H  u  pg [        XXqU5        M     U(       a   [        U5      S:X  a  US   e[        XU5      eg! [         a  nUR                  U5         SnAM`  SnAff = f)aH  
Verify that *candidate* might correctly provide *iface*.

This involves:

- Making sure the candidate claims that it provides the
  interface using ``iface.providedBy`` (unless *tentative* is `True`, in
  which case this step is skipped). This means that the candidate's class
  declares that it `implements <zope.interface.implementer>` the
  interface, or the candidate itself declares that it `provides
  <zope.interface.provider>`
  the interface

- Making sure the candidate defines all the necessary methods

- Making sure the methods have the correct signature (to the
  extent possible)

- Making sure the candidate defines all the necessary attributes

:return bool: Returns a true value if everything that could be
   checked passed.
:raises zope.interface.Invalid: If any of the previous
   conditions does not hold.

.. versionchanged:: 5.0
    If multiple methods or attributes are invalid, all such errors
    are collected and reported. Previously, only the first error was
    reported.  As a special case, if only one such error is present, it is
    raised alone, like before.
ÚcT)ÚallNé   r   )	ÚimplementedByÚ
providedByÚappendr   ÚnamesAndDescriptionsÚ_verify_elementr   Úlenr	   )	ÚifaceÚ	candidateÚ	tentativeÚvtypeÚtesterÚexcsÚnameÚdescÚes	            ÚYC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\zope/interface/verify.pyÚ_verifyr#   )   s¹   € ðB �ƒ|Ø×$Ñ$‰à×!Ñ!ˆà€DÞ™V I×.Ñ.Ø�‰Ô$ UÓ6Ô7à×0Ñ0°TÐ0Ó:‰
ˆð	Ü˜E¨¸%Ö@ñ ;ö Üˆt‹9˜‹>Ø�q‘'ˆMÜ˜e°Ó5Ð5àøô ó 	Ø�K‰K˜�NŠNûð	ús   Á%BÂ
CÂ(B?Â?Cc                 ó  •  [        X15      n[        U[        5      (       d  g [
        R                  " U5      (       d  [
        R                  " U5      (       a  g [        U[        5      (       a2  [        U[        5      (       a  US:X  a  [        XPUSS9nO…[        XPUS9nOz[        U[        5      (       a)  [        UR                  5      [        L a  [        XPU5      nO<[        U[        5      (       a  US:X  a  g [        U5      (       d  [!        USUU U5      eg [#        UR%                  5       UR%                  5       5      nU(       a  [!        X'XPU5      eg ! [         a*    [        U[        5      (       d  US:X  a   g [	        XU5      ef = f)Nr   r   )r   Úimlevel)r   zimplementation is not a method)ÚgetattrÚAttributeErrorÚ
isinstancer
   r   ÚinspectÚismethoddescriptorÚ	isbuiltinr   Útyper   ÚMethodTypesÚ__func__r   ÚpropertyÚcallabler   Ú	_incompatÚgetSignatureInfo)r   r   r    r   r   ÚattrÚmethÚmesss           r"   r   r   a   sg  € ð
;Ü�yÓ'ˆô �dœF×#Ñ#àä×!Ò! $×'Ñ'¬7×+<Ò+<¸T×+BÑ+Bð 	ä�$œ×%Ñ%ä�i¤×&Ñ&¨5°C«<ô
   °$ÀÑB‰Dô   °$Ñ7‰Dô 	�4œ×%Ñ%ÜˆT�]‰]Óœ|Ò+ä˜$ tÓ,‰ä	�Dœ(×	#Ñ	#¨°«ð
 	ô ˜�~‰~Ü,ØØ0ØØØóð ð 	ô �T×*Ñ*Ó,¨d×.CÑ.CÓ.EÓF€DÞÜ(¨°TÀ)ÓLÐLð øôM ó ;ä˜4¤×(Ñ(¨e°s«lñ ô # 5°	Ó:Ð:ð;ús   ‚E Å%FÅ?Fc                 ó   • [        XUSS9$ )z>
Verify that the *candidate* might correctly provide *iface*.
r   ©r   ©r#   ©r   r   r   s      r"   r   r   ¯   s   € ô �5 Y°cÑ:Ð:ó    c                 ó   • [        XUSS9$ )NÚor7   r8   r9   s      r"   r   r   ¶   s   € Ü�5 Y°cÑ:Ð:r:   z*implementation requires too many argumentsc                 óô   • [        US   5      [        U S   5      :”  a  [        $ [        US   5      [        U S   5      :  a  US   (       d  gU S   (       a  US   (       d  gU S   (       a  US   (       d  gg g )NÚrequiredÚ
positionalÚvarargsz-implementation doesn't allow enough argumentsÚkwargsz0implementation doesn't support keyword argumentsz1implementation doesn't support variable arguments)r   Ú_MSG_TOO_MANY)r>   Úimplementeds     r"   r1   r1   ¿   s{   € ô
 ˆ;�zÑ"Ó#¤c¨(°:Ñ*>Ó&?Ó?ÜÐô 
ˆ[˜Ñ&Ó	'¬#¨h°|Ñ.DÓ*EÓ	EØ˜	×"à>à�× +¨h×"7ØAà�	× ;¨y×#9ØBð $:Ðr:   )FN)F)Ú__doc__r)   ÚsysÚtypesr   r   Úzope.interface.exceptionsr   r   r   r   r	   Úzope.interface.interfacer
   r   r   Ú__all__r-   r#   r   r   r   rB   r1   © r:   r"   Ú<module>rK      sw   ðñã Û 
Ý Ý å :Ý @Ý 6Ý -Ý 5Ý +Ý 1Ý /ð Øð€ð ˆn€ô5òpKMô\;ô;ð —‘€Ô à<€óCr:   