AlkantarClanX12

Your IP : 18.223.237.218


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/abc.cpython-310.pyc

o

6��fz�@s�dZdd�ZGdd�de�ZGdd�de�ZGdd�de�Zzd	d
lm	Z	m
Z
mZmZm
Z
mZmZmZWneyHd	dlmZm	Z	de_Yn	wGd
d�de�Zdd�ZGdd�ded�ZdS)z3Abstract Base Classes (ABCs) according to PEP 3119.cCs
d|_|S)a<A decorator indicating abstract methods.

    Requires that the metaclass is ABCMeta or derived from it.  A
    class that has a metaclass derived from ABCMeta cannot be
    instantiated unless all of its abstract methods are overridden.
    The abstract methods can be called using any of the normal
    'super' call mechanisms.  abstractmethod() may be used to declare
    abstract methods for properties and descriptors.

    Usage:

        class C(metaclass=ABCMeta):
            @abstractmethod
            def my_abstract_method(self, ...):
                ...
    T)�__isabstractmethod__)�funcobj�r�*/opt/alt/python310/lib64/python3.10/abc.py�abstractmethodsrc�$eZdZdZdZ�fdd�Z�ZS)�abstractclassmethodaA decorator indicating abstract classmethods.

    Deprecated, use 'classmethod' with 'abstractmethod' instead:

        class C(ABC):
            @classmethod
            @abstractmethod
            def my_abstract_classmethod(cls, ...):
                ...

    Tc�d|_t��|�dS�NT�r�super�__init__��self�callable��	__class__rrr+�zabstractclassmethod.__init__��__name__�
__module__�__qualname__�__doc__rr�
__classcell__rrrrr�rcr)�abstractstaticmethodaA decorator indicating abstract staticmethods.

    Deprecated, use 'staticmethod' with 'abstractmethod' instead:

        class C(ABC):
            @staticmethod
            @abstractmethod
            def my_abstract_staticmethod(...):
                ...

    Tcrr	r
r
rrrr?rzabstractstaticmethod.__init__rrrrrr0rrc@�eZdZdZdZdS)�abstractpropertyz�A decorator indicating abstract properties.

    Deprecated, use 'property' with 'abstractmethod' instead:

        class C(ABC):
            @property
            @abstractmethod
            def my_abstract_property(self):
                ...

    TN)rrrrrrrrrrDsr�)�get_cache_token�	_abc_init�
_abc_register�_abc_instancecheck�_abc_subclasscheck�	_get_dump�_reset_registry�
_reset_caches)�ABCMetar�abccsReZdZdZ�fdd�Zdd�Zdd�Zdd	�Zddd�Zd
d�Z	dd�Z
�ZS)r&a�Metaclass for defining Abstract Base Classes (ABCs).

        Use this metaclass to create an ABC.  An ABC can be subclassed
        directly, and then acts as a mix-in class.  You can also register
        unrelated concrete classes (even built-in classes) and unrelated
        ABCs as 'virtual subclasses' -- these and their descendants will
        be considered subclasses of the registering ABC by the built-in
        issubclass() function, but the registering ABC won't show up in
        their MRO (Method Resolution Order) nor will method
        implementations defined by the registering ABC be callable (not
        even via super()).
        cs&t�j||||fi|��}t|�|S�N)r�__new__r)�mcls�name�bases�	namespace�kwargs�clsrrrr)iszABCMeta.__new__cC�
t||�S)z{Register a virtual subclass of an ABC.

            Returns the subclass, to allow usage as a class decorator.
            )r �r/�subclassrrr�registerns
zABCMeta.registercCr0)z'Override for isinstance(instance, cls).)r!)r/�instancerrr�__instancecheck__u�
zABCMeta.__instancecheck__cCr0)z'Override for issubclass(subclass, cls).)r"r1rrr�__subclasscheck__yr6zABCMeta.__subclasscheck__NcCs�td|j�d|j��|d�tdt���|d�t|�\}}}}td|��|d�td|��|d�td|��|d�td|��|d�d	S)
z'Debug helper to print the ABC registry.zClass: �.)�filezInv. counter: z_abc_registry: z_abc_cache: z_abc_negative_cache: z_abc_negative_cache_version: N)�printrrrr#)r/r9�
_abc_registry�
_abc_cache�_abc_negative_cache�_abc_negative_cache_versionrrr�_dump_registry}s�

�zABCMeta._dump_registrycC�t|�dS)z.Clear the registry (for debugging or testing).N)r$�r/rrr�_abc_registry_clear��zABCMeta._abc_registry_clearcCr@)z,Clear the caches (for debugging or testing).N)r%rArrr�_abc_caches_clear�rCzABCMeta._abc_caches_clearr()rrrrr)r3r5r7r?rBrDrrrrrr&\s
r&cCs�t|d�s|St�}|jD]}t|dd�D]}t||d�}t|dd�r(|�|�qq
|j��D]\}}t|dd�r>|�|�q/t|�|_|S)a�Recalculate the set of abstract methods of an abstract class.

    If a class has had one of its abstract methods implemented after the
    class was created, the method will not be considered implemented until
    this function is called. Alternatively, if a new abstract method has been
    added to the class, it will only be considered an abstract method of the
    class after this function is called.

    This function should be called before any use is made of the class,
    usually in class decorators that add methods to the subject class.

    Returns cls, to allow usage as a class decorator.

    If cls is not an instance of ABCMeta, does nothing.
    �__abstractmethods__rNrF)	�hasattr�set�	__bases__�getattr�add�__dict__�items�	frozensetrE)r/�	abstracts�sclsr+�valuerrr�update_abstractmethods�s 


��
�
rQc@r)�ABCzVHelper class that provides a standard way to create an ABC using
    inheritance.
    rN)rrrr�	__slots__rrrrrR�srR)�	metaclassN)rr�classmethodr�staticmethodr�propertyr�_abcrrr r!r"r#r$r%�ImportErrorZ_py_abcr&r�typerQrRrrrr�<module>s,
�6&