%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/jaraco/classes/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/jaraco/classes/__pycache__/meta.cpython-312.pyc

�

�2`=��4�dZGd�de�ZGd�de�Zy)z#
meta.py

Some useful metaclasses.
c��eZdZdZd�Zy)�LeafClassesMetaa�
    A metaclass for classes that keeps track of all of them that
    aren't base classes.

    >>> Parent = LeafClassesMeta('MyParentClass', (), {})
    >>> Parent in Parent._leaf_classes
    True
    >>> Child = LeafClassesMeta('MyChildClass', (Parent,), {})
    >>> Child in Parent._leaf_classes
    True
    >>> Parent in Parent._leaf_classes
    False

    >>> Other = LeafClassesMeta('OtherClass', (), {})
    >>> Parent in Other._leaf_classes
    False
    >>> len(Other._leaf_classes)
    1
    c��t|d�st�|_t|d�}|j	|�|t|�z}y)N�
_leaf_classes)�hasattr�setr�getattr�add)�cls�name�bases�attrs�leaf_classess     �5/usr/lib/python3/dist-packages/jaraco/classes/meta.py�__init__zLeafClassesMeta.__init__s>���s�O�,� #��C���s�O�4���������E�
�"��N)�__name__�
__module__�__qualname__�__doc__r�rrrrs���(#rrc�&��eZdZdZdZ�fd�Z�xZS)�
TagRegisteredaY
    As classes of this metaclass are created, they keep a registry in the
    base class of all classes by a class attribute, indicated by attr_name.

    >>> FooObject = TagRegistered('FooObject', (), dict(tag='foo'))
    >>> FooObject._registry['foo'] is FooObject
    True
    >>> BarObject = TagRegistered('Barobject', (FooObject,), dict(tag='bar'))
    >>> FooObject._registry is BarObject._registry
    True
    >>> len(FooObject._registry)
    2

    '...' below should be 'jaraco.classes' but for pytest-dev/pytest#3396
    >>> FooObject._registry['bar']
    <class '....meta.Barobject'>
    �tagc���tt|�|||�t|d�si|_|j
}t
||jd�}|r||j|<yy)N�	_registry)�superrrrr�	__class__r�	attr_name)r
rr�	namespace�meta�attrrs      �rrzTagRegistered.__init__;sX���
�m�S�*�4��	�B��s�K�(��C�M��}�}���s�D�N�N�D�1���"%�C�M�M�$��r)rrrrrr�
__classcell__)rs@rrr&s����$�I�&�&rrN)r�typerrrrr�<module>r$s"���#�d�#�<&�D�&r

Zerion Mini Shell 1.0