Your IP : 13.58.233.16


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/pydantic/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/pydantic/__pycache__/root_model.cpython-311.pyc

�

�&fU���dZddlmZddlZddlmZmZddlmZddl	m
Z
ddlmZdd	l
mZmZejrdd
lmZddlmZejdd
���ZdZejd��ZGd�deeje��ZdS)z%RootModel class and type definitions.�)�annotationsN)�copy�deepcopy)�PydanticUndefined�)�PydanticUserError)�_repr)�	BaseModel�_object_setattr)�Any)�Literal�Modelr
)�bound)�	RootModel�RootModelRootTypec
����eZdZUdZdZdZdZded<�fd�Ze	fd-d	�Z
de
_ed.d/�fd�
��Z
d0d�Zd1d�Zd2d�Zd.d3d�Zejrdddddddddd�	d4d(�Zd5�fd*�Zd6d,�Z�xZS)7ra�Usage docs: https://docs.pydantic.dev/2.4/concepts/models/#rootmodel-and-custom-root-types

    A Pydantic `BaseModel` for the root object of the model.

    Attributes:
        root: The root object of the model.
        __pydantic_root_model__: Whether the model is a RootModel.
        __pydantic_private__: Private fields in the model.
        __pydantic_extra__: Extra fields in the model.

    TNr�rootc���|j�d��}|�tdd����t��jdi|��dS)N�extraz<`RootModel` does not support setting `model_config['extra']`zroot-model-extra)�code�)�model_config�getr�super�__init_subclass__)�cls�kwargsr�	__class__s   ��H/opt/cloudlinux/venv/lib/python3.11/site-packages/pydantic/root_model.pyrzRootModel.__init_subclass__/sa���� �$�$�W�-�-����#�N�Ug����
�	"����!�+�+�F�+�+�+�+�+��return�Nonec�z�d}|r|turtd���|}|j�||���dS)NTz_"RootModel.__init__" accepts either a single positional argument or arbitrary keyword arguments)�
self_instance)r�
ValueError�__pydantic_validator__�validate_python)�__pydantic_self__r�data�__tracebackhide__s    r�__init__zRootModel.__init__7s[�� ���	��,�,�,� �u�����D��0�@�@��Uf�@�g�g�g�g�gr r�type[Model]�_fields_set�set[str] | Nonerc�J��t���||���S)aSCreate a new model using the provided root object and update fields set.

        Args:
            root: The root object of the model.
            _fields_set: The set of fields to be updated.

        Returns:
            The new model.

        Raises:
            NotImplemented: If the model is not a subclass of `RootModel`.
        )rr-)r�model_construct)rrr-rs   �rr0zRootModel.model_constructCs"����w�w�&�&�D�k�&�J�J�Jr �dict[Any, Any]c� �|j|jd�S)N��__dict__�__pydantic_fields_set__r3��selfs r�__getstate__zRootModel.__getstate__Ss���
�'+�'C�
�
�	
r �statec�b�t|d|d��t|d|d��dS)Nr5r4)r)r7r9s  r�__setstate__zRootModel.__setstate__Ys8����7��?X�9Y�Z�Z�Z���j�%�
�*;�<�<�<�<�<r r7c���t|��}|�|��}t|dt|j����t|dt|j����|S)z$Returns a shallow copy of the model.r4r5)�type�__new__rrr4r5)r7r�ms   r�__copy__zRootModel.__copy__]s]���4�j�j���K�K�������:�t�D�M�':�':�;�;�;���4�d�4�;W�6X�6X�Y�Y�Y��r �memo�dict[int, Any] | Nonec���t|��}|�|��}t|dt|j|�����t|dt|j����|S)z!Returns a deep copy of the model.r4)rAr5)r=r>rrr4rr5)r7rArr?s    r�__deepcopy__zRootModel.__deepcopy__esd���4�j�j���K�K�������:�x��
�D�'I�'I�'I�J�J�J�	��4�d�4�;W�6X�6X�Y�Y�Y��r �pythonF)	�mode�include�exclude�by_alias�
exclude_unset�exclude_defaults�exclude_none�
round_trip�warningsrF�Literal['json', 'python'] | strrGrrHrI�boolrJrKrLrMrNc	��dS)a(This method is included just to get a more accurate return type for type checkers.
            It is included in this `if TYPE_CHECKING:` block since no override is actually necessary.

            See the documentation of `BaseModel.model_dump` for more details about the arguments.
            Nr)
r7rFrGrHrIrJrKrLrMrNs
          r�
model_dumpzRootModel.model_dumpqs	��$
�Cr �otherc����t|t��stS|jdj|jdjko t���|��S�Nr)�
isinstancer�NotImplemented�model_fields�
annotationr�__eq__)r7rSrs  �rrZzRootModel.__eq__�sW����%��+�+�	"�!�!�� ��(�3�u�7I�&�7Q�7\�\�v�af�ah�ah�ao�ao�pu�av�av�vr �_repr.ReprArgsc#� K�d|jfV�dSrU)rr6s r�
__repr_args__zRootModel.__repr_args__�s�����d�i������r )rrr!r")N)rr,rrr-r.r!r)r!r1)r9r1r!r")r7rr!r)r7rrArBr!r)rFrOrGrrHrrIrPrJrPrKrPrLrPrMrPrNrPr!r)rSrr!rP)r!r[)�__name__�
__module__�__qualname__�__doc__�__pydantic_root_model__�__pydantic_private__�__pydantic_extra__�__annotations__rrr+�__pydantic_base_init__�classmethodr0r8r;r@rD�typing�
TYPE_CHECKINGrRrZr]�
__classcell__)rs@rrrs���������
�
�#����������,�,�,�,�,�?P�h�h�h�h�h�'+�H�#��
K�
K�
K�
K�
K�
K��[�
K�
�
�
�
�=�=�=�=�������������
5=���"�"'�%*�!&�$�!�	�	�	�	�	�	�(w�w�w�w�w�w�
 � � � � � � � r r)ra�
__future__r�_annotationsrhrr�
pydantic_corer�r�	_internalr	�mainr
rrir�typing_extensionsr
�TypeVarr�__all__r�Genericrrr r�<module>rus5��+�+�2�2�2�2�2�2�
�
�
�
���������+�+�+�+�+�+�������������,�,�,�,�,�,�,�,�	��7�������)�)�)�)�)�)��F�N�7�+�6�6�6�E���#�F�N�#6�7�7��o �o �o �o �o �	�6�>�*;�<�o �o �o �o �o r 

?>