Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/zope/interface/__pycache__/declarations.cpython-39.pyc
Ðазад
a i�h�� � @ s d Z dZddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddl mZ dd l mZ dd l m Z ddl mZ ddl mZ dd l mZ g Zi Zdd� ZG dd� d�ZG dd� de�ZG dd� de�ZG dd� dee�Zdd� Zdd� Ze dd� �Zdd� Zd d!� Zd"d#� ZdKd%d&�Zd'd(� ZG d)d*� d*�Z G d+d,� d,�Z!G d-d.� d.e�Z"e"Z#e�$� Z%d/d.� Z"d0e"_&d1d2� Z'd3d4� Z(d5d6� Z)e G d7d8� d8e��Z*G d9d:� d:ee*�Z+d;d<� Z,G d=d>� d>�Z-d?d@� Z.dAdB� Z/e dCdD� �Z0e dEdF� �Z1e G dGdH� dH��Z2dLdIdJ�Z3e� Z4e2� Z5dS )Ma� Implementation of interface declarations There are three flavors of declarations: - Declarations are used to simply name declared interfaces. - ImplementsDeclarations are used to express the interfaces that a class implements (that instances of the class provides). Implements specifications support inheriting interfaces. - ProvidesDeclarations are used to express interfaces directly provided by objects. �restructuredtext� N)�FunctionType)� MethodType)� ModuleType)�_use_c_impl)� Interface)� InterfaceBase)�InterfaceClass)�NameAndModuleComparisonMixin)� Specification)�SpecificationBasec C s( | j }| j}|j}||�|�d }|S )N� )�__self_class__� __thisclass__�__mro__�index)�obZ self_classZclass_that_invoked_superZcomplete_mroZ next_class� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/zope/interface/declarations.py�_next_super_class7 s r c @ s e Zd Zdd� Zdd� ZdS )�namedc C s || _ d S �N)�name)�selfr r r r �__init__D s znamed.__init__c C s | j |_|S r )r Z__component_name__�r r r r r �__call__G s znamed.__call__N)�__name__� __module__�__qualname__r r r r r r r B s r c @ s` e Zd ZdZdZdd� Zdd� Zdd� Zd d � Zdd� Z d d� Z e Zedd� �Z edd� �ZdS )�DeclarationzInterface declarationsr c G s t �| t|�� d S r )r r �_normalizeargs)r �basesr r r r Q s zDeclaration.__init__c C s | � |�o|| �� v S )z:Test whether an interface is in the specification )�extends� interfaces)r � interfacer r r �__contains__T s zDeclaration.__contains__c C s | � � S )zCReturn an iterator for the interfaces in the specification �r$ �r r r r �__iter__Z s zDeclaration.__iter__c C s t | j�S )zCReturn an iterator of all included and extended interfaces )�iterZ__iro__r( r r r � flattened_ s zDeclaration.flattenedc s t � fdd�| �� D �� S )z/Remove interfaces from a specification c s&