CasperSecurity

Current Path : /lib/python3/dist-packages/zope/component/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/zope/component/__pycache__/interface.cpython-310.pyc

o

,�W��@s�dZddlmZddlmZddlmZddlmZddl	m
Z
ddlmZdd
d�Z
dd
�Zddd�Zddd�Zddd�Zddd�Zdd�Zdd�Zdd�ZdS)zInterface utility functions
�)�alsoProvides)�
IInterface)�getGlobalSiteManager)�ComponentLookupError)�queryUtility)�CLASS_TYPESN�cCs||s
d|j|jf}t�|�st|t�st|d��dS|dur/|�t�s)t|d��t||�nt}t	�}|�
||||�dS)z@ Mark 'interface' as a named utilty providing 'iface_type'.
    �%s.%szis not an interface or classNzis not an interface type)�
__module__�__name__r�
providedBy�
isinstancer�	TypeError�extendsrr�registerUtility)�id�	interface�
iface_type�info�gsm�r�:/usr/lib/python3/dist-packages/zope/component/interface.py�provideInterfaces




rcCst|d�}|dur
t|��|S)z3Return interface or raise ComponentLookupError
    N)�queryInterfacer��contextr�ifacerrr�getInterface.s
rcCstt||�S)z$Return an interface or ``None``
    )rr)r�defaultrrrr7srcC�dd�t|||�D�S)�Interfaces search
    cS�g|]}|d�qS��r��.0�
iface_utilrrr�
<listcomp>@�z#searchInterface.<locals>.<listcomp>��searchInterfaceUtilities�r�
search_string�baserrr�searchInterface=�
�r.cCr)r cSr!)rrr$rrrr'Gr(z&searchInterfaceIds.<locals>.<listcomp>r)r+rrr�searchInterfaceIdsDr/r0csZt�}|�t�}�r�����fdd�|D�}�r$�fdd�|D�}|Sdd�|D�}|S)Ncs&g|]}t|d����dkr|�qS)r#r)�getInterfaceAllDocs�findr$)r,rrr'Qs
��z,searchInterfaceUtilities.<locals>.<listcomp>csg|]}|d���r|�qSr")�isOrExtendsr$�r-rrr'Us
�cSsg|]}|�qSrrr$rrrr'Xs)r�getUtilitiesForr�lower)rr,r-r�iface_utilities�resr)r-r,rr*Ks
�r*cCsfd|j|jf}t|���t|j���g}t�|�r.t|�D]}|�t|�	|�j����qd�
|�S)Nr	�
)r
r�strr6�__doc__rr�sorted�append�getDescriptionFor�join)r�iface_id�docs�namerrrr1\s
�
�
r1cCs|dkrdSt||�}|S)N�None)rrrrr�nameToInterfaceis
rDcs^�durdSt|�d�}�fdd�|D�}|s�jd�jSt|�dks+Jd|��|dS)	NrCr4cs$g|]}|�krd|j|jf�qS)r	)r
r)r%r�rrrr'us
�z#interfaceToName.<locals>.<listcomp>�.r#zAmbiguous interface names: %sr)r.r
r�len)rr�items�idsrrEr�interfaceToNameos
�rJ)Nr)N)NN)r;�zope.interfacer�zope.interface.interfacesr�zope.component.globalregistryr�zope.component.interfacesr�zope.component._apir�zope.component._compatrrrrr.r0r*r1rDrJrrrr�<module>s 


	




Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY