HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberPanel/lib64/python3.10/site-packages/pydantic/__pycache__/errors.cpython-310.pyc
o

��hr�@sdZddlmZddlZddlmZmZmZddl	m
Z
ddlmZddl
mZdd	lmZdd
lmZdZde��d
�ZedZGdd�d�ZGdd�dee�ZGdd�dee�ZGdd�dee�ZGdd�de�ZGdd�de�ZGdd�de�Zee �Z!dS)zPydantic-specific errors.�)�annotationsN)�Any�ClassVar�Literal)�Self)�	Qualifier)�_repr�)�getattr_migration)�
version_short)�PydanticUserError�PydanticUndefinedAnnotation�PydanticImportError�PydanticSchemaGenerationError�PydanticInvalidForJsonSchema�PydanticForbiddenQualifier�PydanticErrorCodeszhttps://errors.pydantic.dev/z/u/)0zclass-not-fully-definedzcustom-json-schemazdecorator-missing-fieldzdiscriminator-no-fieldzdiscriminator-alias-typezdiscriminator-needs-literalzdiscriminator-aliaszdiscriminator-validatorzcallable-discriminator-no-tagztyped-dict-versionzmodel-field-overriddenzmodel-field-missing-annotationzconfig-bothzremoved-kwargszcircular-reference-schema�invalid-for-json-schemazjson-schema-already-usedzbase-model-instantiated�undefined-annotation�schema-for-unknown-type�import-errorzcreate-model-field-definitionszvalidator-no-fieldszvalidator-invalid-fieldszvalidator-instance-methodzvalidator-input-typezroot-validator-pre-skipz model-serializer-instance-methodzvalidator-field-config-infozvalidator-v1-signaturezvalidator-signaturezfield-serializer-signaturezmodel-serializer-signaturezmultiple-field-serializerszinvalid-annotated-typeztype-adapter-config-unusedzroot-model-extrazunevaluable-type-annotationz dataclass-init-false-extra-allowzclashing-init-and-init-varzmodel-config-invalid-field-namezwith-config-on-modelzdataclass-on-modelzvalidate-call-typezunpack-typed-dictzoverlapping-unpack-typed-dictzinvalid-self-typez validate-by-alias-and-name-falsec@s$eZdZdZd
dd	�Zdd
d�ZdS)�PydanticErrorMixinz�A mixin class for common functionality shared by all Pydantic-specific errors.

    Attributes:
        message: A message describing the error.
        code: An optional error code from PydanticErrorCodes enum.
    �message�str�code�PydanticErrorCodes | None�return�NonecCs||_||_dS)N�rr)�selfrr�r �E/usr/local/CyberPanel/lib/python3.10/site-packages/pydantic/errors.py�__init__Zs
zPydanticErrorMixin.__init__cCs&|jdur|jS|j�dt�|j��S)Nz 

For further information visit )rr�DEV_ERROR_DOCS_URL)rr r r!�__str__^s
zPydanticErrorMixin.__str__N)rrrrrr)rr)�__name__�
__module__�__qualname__�__doc__r"r$r r r r!rRs
rc@seZdZdZdS)rz1An error raised due to incorrect use of Pydantic.N)r%r&r'r(r r r r!resrcs0eZdZdZd�fdd�Zeddd
��Z�ZS)r
z�A subclass of `NameError` raised when handling undefined annotations during `CoreSchema` generation.

    Attributes:
        name: Name of the error.
        message: Description of the error.
    �namerrrrcs||_t�j|dd�dS)Nrr)r)�superr")rr)r��	__class__r r!r"qsz$PydanticUndefinedAnnotation.__init__�
name_error�	NameErrorrcCsDz|j}Wntyt�dt|���d�}Ynw||t|�d�S)z�Convert a `NameError` to a `PydanticUndefinedAnnotation` error.

        Args:
            name_error: `NameError` to be converted.

        Returns:
            Converted `PydanticUndefinedAnnotation` error.
        z	.*'(.+?)'r	)r)r)r)�AttributeError�re�searchr�group)�clsr-r)r r r!�from_name_errorus

�z+PydanticUndefinedAnnotation.from_name_error)r)rrrrr)r-r.rr)r%r&r'r(r"�classmethodr4�
__classcell__r r r+r!r
is
r
c�"eZdZdZd�fdd�Z�ZS)	rz�An error raised when an import fails due to module changes between V1 and V2.

    Attributes:
        message: Description of the error.
    rrrrc�t�j|dd�dS)Nr�r�r*r"�rrr+r r!r"��zPydanticImportError.__init__�rrrr�r%r&r'r(r"r6r r r+r!r��rcr7)	rz�An error raised during failures to generate a `CoreSchema` for some type.

    Attributes:
        message: Description of the error.
    rrrrcr8)Nrr9r:r;r+r r!r"�r<z&PydanticSchemaGenerationError.__init__r=r>r r r+r!r�r?rcr7)	rz�An error raised during failures to generate a JSON schema for some `CoreSchema`.

    Attributes:
        message: Description of the error.
    rrrrcr8)Nrr9r:r;r+r r!r"�r<z%PydanticInvalidForJsonSchema.__init__r=r>r r r+r!r�r?rcs>eZdZUdZddddddd�Zd	ed
<d�fdd�Z�ZS)rzLAn error raised if a forbidden type qualifier is found in a type annotation.ztyping.Requiredztyping.NotRequiredztyping.ReadOnlyztyping.ClassVarzdataclasses.InitVarztyping.Final)�required�not_required�	read_only�	class_var�init_var�finalzClassVar[dict[Qualifier, str]]�_qualifier_repr_map�	qualifierr�
annotationrrrcs.t�jdt�|��d|j|�d�dd�dS)NzThe annotation z contains the z? type qualifier, which is invalid in the context it is defined.r)r*r"r�display_as_typerF)rrGrHr+r r!r"�s
�z#PydanticForbiddenQualifier.__init__)rGrrHrrr)r%r&r'r(rF�__annotations__r"r6r r r+r!r�s
�	r)"r(�
__future__r�_annotationsr0�typingrrr�typing_extensionsr�typing_inspection.introspectionr�pydantic._internalr�
_migrationr
�versionr�__all__r#rr�	TypeErrorrr.r
�ImportErrorrrrrr%�__getattr__r r r r!�<module>s,
�4