HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/1233/root/usr/local/lib/python3.10/dist-packages/pydantic/__pycache__/errors.cpython-310.pyc
o

|��g��@s�dZddlmZddlZddlmZmZddlm	Z	ddl
mZdZd	e��d
�Z
edZGdd
�d
�ZGdd�dee�ZGdd�dee�ZGdd�dee�ZGdd�de�ZGdd�de�Ze	e�ZdS)zPydantic-specific errors.�)�annotationsN)�Literal�Self�)�getattr_migration)�
version_short)�PydanticUserError�PydanticUndefinedAnnotation�PydanticImportError�PydanticSchemaGenerationError�PydanticInvalidForJsonSchema�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-definitionszcreate-model-config-basezvalidator-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-typec@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�:/usr/local/lib/python3.10/dist-packages/pydantic/errors.py�__init__Us
zPydanticErrorMixin.__init__cCs&|jdur|jS|j�dt�|j��S)Nz 

For further information visit )rr�DEV_ERROR_DOCS_URL)rrrr�__str__Ys
zPydanticErrorMixin.__str__N)rrrrrr)rr)�__name__�
__module__�__qualname__�__doc__rrrrrrrMs
rc@seZdZdZdS)rz1An error raised due to incorrect use of Pydantic.N)r r!r"r#rrrrr`srcs0eZdZdZd�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__rrrlsz$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$rrr�from_name_errorps

�z+PydanticUndefinedAnnotation.from_name_error)r$rrrrr)r(r)rr)r r!r"r#r�classmethodr/�
__classcell__rrr&rr	ds
r	c�"eZdZdZd�fdd�Z�ZS)	r
z�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&rrr��zPydanticImportError.__init__�rrrr�r r!r"r#rr1rrr&rr
��r
cr2)	rz�An error raised during failures to generate a `CoreSchema` for some type.

    Attributes:
        message: Description of the error.
    rrrrcr3)Nrr4r5r6r&rrr�r7z&PydanticSchemaGenerationError.__init__r8r9rrr&rr�r:rcr2)	rz�An error raised during failures to generate a JSON schema for some `CoreSchema`.

    Attributes:
        message: Description of the error.
    rrrrcr3)Nrr4r5r6r&rrr�r7z%PydanticInvalidForJsonSchema.__init__r8r9rrr&rr�r:r)r#�
__future__r�_annotationsr+�typing_extensionsrr�
_migrationr�versionr�__all__rr
r�	TypeErrorrr)r	�ImportErrorr
rrr �__getattr__rrrr�<module>s$�4