JFIF$        dd7 

Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/pyrsistent/__pycache__/_immutable.cpython-311.pyc

�

_�j�t�J���ddlZdd�ZdS)�N��	ImmutableFc���t�t��r(��dd�������fd�}d�d��D����}d�||rd|znd|��|�	��}|rt
|��d
dlm}t|d�
��}	t||��n5#t$r(}tt|��dz|z��|�d}~wwxYw||S)a�
    Produces a class that either can be used standalone or as a base class for persistent classes.

    This is a thin wrapper around a named tuple.

    Constructing a type and using it to instantiate objects:

    >>> Point = immutable('x, y', name='Point')
    >>> p = Point(1, 2)
    >>> p2 = p.set(x=3)
    >>> p
    Point(x=1, y=2)
    >>> p2
    Point(x=3, y=2)

    Inheriting from a constructed type. In this case no type name needs to be supplied:

    >>> class PositivePoint(immutable('x, y')):
    ...     __slots__ = tuple()
    ...     def __new__(cls, x, y):
    ...         if x > 0 and y > 0:
    ...             return super(PositivePoint, cls).__new__(cls, x, y)
    ...         raise Exception('Coordinates must be positive!')
    ...
    >>> p = PositivePoint(1, 2)
    >>> p.set(x=3)
    PositivePoint(x=3, y=2)
    >>> p.set(y=-3)
    Traceback (most recent call last):
    Exception: Coordinates must be positive!

    The persistent class also supports the notion of frozen members. The value of a frozen member
    cannot be updated. For example it could be used to implement an ID that should remain the same
    over time. A frozen member is denoted by a trailing underscore.

    >>> Point = immutable('x, y, id_', name='Point')
    >>> p = Point(1, 2, id_=17)
    >>> p.set(x=3)
    Point(x=3, y=2, id_=17)
    >>> p.set(id_=18)
    Traceback (most recent call last):
    AttributeError: Cannot set frozen members id_
    �,� c�v��d��D��}|r)d�d�|�����SdS)Nc�B�g|]}|�d���d|z��S)�_�'%s')�endswith)�.0�fs  �u/builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/pyrsistent/_immutable.py�
<listcomp>z9immutable.<locals>.frozen_member_test.<locals>.<listcomp>5s+��I�I�I�����C���I�&�1�*�I�I�I�z�
        frozen_fields = fields_to_modify & set([{frozen_members}])
        if frozen_fields:
            raise AttributeError('Cannot set frozen members %s' % ', '.join(frozen_fields))
            �, )�frozen_membersr)�format�join)r�memberss �r�frozen_member_testz%immutable.<locals>.frozen_member_test4sN���I�I�g�I�I�I���	A����d�i�i��&?�&?��@�@�	
A��rrrc3� K�|]	}d|zV��
dS)rN�)r
�ms  r�	<genexpr>zimmutable.<locals>.<genexpr>?s&����;�;�a�v��z�;�;�;�;�;�;raq
class {class_name}(namedtuple('ImmutableBase', [{quoted_members}])):
    __slots__ = tuple()

    def __repr__(self):
        return super({class_name}, self).__repr__().replace('ImmutableBase', self.__class__.__name__)

    def set(self, **kwargs):
        if not kwargs:
            return self

        fields_to_modify = set(kwargs.keys())
        if not fields_to_modify <= {member_set}:
            raise AttributeError("'%s' is not a member" % ', '.join(fields_to_modify - {member_set}))

        {frozen_member_test}

        return self.__class__.__new__(self.__class__, *map(kwargs.pop, [{quoted_members}], self))
z	set([%s])zset())�quoted_members�
member_setr�
class_namer)�
namedtuple�pyrsistent_immutable)r�__name__z:
N)�
isinstance�str�replace�splitrr�print�collectionsr�dict�exec�SyntaxError)	r�name�verboserr�templater�	namespace�es	`        r�	immutabler0sQ���Z�'�3���4��/�/�#�s�+�+�1�1�3�3��	�	�	�	�	��Y�Y�;�;�7�;�;�;�;�;�N��$�F�.�:H�U�+��6�6�g�"4�"4�"6�"6��� � �%
�.��
�h����&�&�&�&�&�&��
�5K�L�L�L�I�<��X�y�!�!�!�!���<�<�<��#�a�&�&�5�.�8�3�4�4�!�;�����<�����T�?�s�4C�
C7�#C2�2C7)rrF)�sysr0rrr�<module>r2s2��
�
�
�
�]�]�]�]�]�]r
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪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