
    h                    >   S r SSKJr  SSKrSSKJrJrJr  SSK	J
r
  SSKJr  SSKJr  SS	KJr  SS
KJr  SrS\" 5        S3r\S   r " S S5      r " S S\\5      r " S S\\5      r " S S\\5      r " S S\5      r " S S\5      r " S S\5      r\" \ 5      r!g)zPydantic-specific errors.    )annotationsN)AnyClassVarLiteral)Self)	Qualifier)_repr   )getattr_migration)version_short)PydanticUserErrorPydanticUndefinedAnnotationPydanticImportErrorPydanticSchemaGenerationErrorPydanticInvalidForJsonSchemaPydanticForbiddenQualifierPydanticErrorCodeszhttps://errors.pydantic.dev/z/u/)1zclass-not-fully-definedzcustom-json-schemazdecorator-missing-fieldzdiscriminator-no-fieldzdiscriminator-alias-typezdiscriminator-needs-literalzdiscriminator-aliaszdiscriminator-validatorzcallable-discriminator-no-tagztyped-dict-versionzmodel-field-overriddenzmodel-field-missing-annotationzconfig-bothzremoved-kwargszcircular-reference-schemainvalid-for-json-schemazjson-schema-already-usedzbase-model-instantiatedundefined-annotationschema-for-unknown-typeimport-errorzcreate-model-field-definitionszcreate-model-config-basezvalidator-no-fieldszvalidator-invalid-fieldszvalidator-instance-methodzvalidator-input-typezroot-validator-pre-skipz model-serializer-instance-methodzvalidator-field-config-infozvalidator-v1-signaturezvalidator-signaturezfield-serializer-signaturezmodel-serializer-signaturezmultiple-field-serializerszinvalid-annotated-typeztype-adapter-config-unusedzroot-model-extrazunevaluable-type-annotationz dataclass-init-false-extra-allowzclashing-init-and-init-varzmodel-config-invalid-field-namezwith-config-on-modelzdataclass-on-modelzvalidate-call-typezunpack-typed-dictzoverlapping-unpack-typed-dictzinvalid-self-typez validate-by-alias-and-name-falsec                  ,    \ rS rSrSrSS jrSS jrSrg)	PydanticErrorMixinS   zA 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.
c                   Xl         X l        g )Nmessagecode)selfr   r   s      A/var/www/html/env/lib/python3.13/site-packages/pydantic/errors.py__init__PydanticErrorMixin.__init__[   s    	    c                v    U R                   c  U R                  $ U R                   S[         U R                    3$ )Nz 

For further information visit )r   r   DEV_ERROR_DOCS_URL)r   s    r    __str__PydanticErrorMixin.__str___   s:    99<<ll^#EFXEYZ^ZcZcYdeer#   )r   r   N)r   strr   zPydanticErrorCodes | NonereturnNone)r)   r(   )__name__
__module____qualname____firstlineno____doc__r!   r&   __static_attributes__ r#   r    r   r   S   s    fr#   r   c                      \ rS rSrSrSrg)r   f   z1An error raised due to incorrect use of Pydantic.r1   N)r+   r,   r-   r.   r/   r0   r1   r#   r    r   r   f   s    ;r#   r   c                  D   ^  \ rS rSrSrSU 4S jjr\SS j5       rSrU =r	$ )r   j   zA subclass of `NameError` raised when handling undefined annotations during `CoreSchema` generation.

Attributes:
    name: Name of the error.
    message: Description of the error.
c                .   > Xl         [        TU ]	  USS9  g )Nr   r   )namesuperr!   )r   r7   r   	__class__s      r    r!   $PydanticUndefinedAnnotation.__init__r   s    	/EFr#   c                     UR                   nU " U[	        U5      S9$ ! [         a2    [        R                  " S[	        U5      5      R                  S5      n NKf = f)zConvert a `NameError` to a `PydanticUndefinedAnnotation` error.

Args:
    name_error: `NameError` to be converted.

Returns:
    Converted `PydanticUndefinedAnnotation` error.
z	.*'(.+?)'r
   )r7   r   )r7   AttributeErrorresearchr(   group)cls
name_errorr7   s      r    from_name_error+PydanticUndefinedAnnotation.from_name_errorv   sV    	E??D c*o66  	E99\3z?;AA!DD	Es    9AA)r7   )r7   r(   r   r(   r)   r*   )rA   	NameErrorr)   r   )
r+   r,   r-   r.   r/   r!   classmethodrB   r0   __classcell__r9   s   @r    r   r   j   s"    G 7 7r#   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r      zAn error raised when an import fails due to module changes between V1 and V2.

Attributes:
    message: Description of the error.
c                "   > [         TU ]  USS9  g )Nr   r   r8   r!   r   r   r9   s     r    r!   PydanticImportError.__init__   s    ~6r#   r1   r   r(   r)   r*   r+   r,   r-   r.   r/   r!   r0   rF   rG   s   @r    r   r      s    7 7r#   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r      z~An error raised during failures to generate a `CoreSchema` for some type.

Attributes:
    message: Description of the error.
c                "   > [         TU ]  USS9  g )Nr   rK   rL   rM   s     r    r!   &PydanticSchemaGenerationError.__init__       '@Ar#   r1   rO   rP   rG   s   @r    r   r          B Br#   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r      zAn error raised during failures to generate a JSON schema for some `CoreSchema`.

Attributes:
    message: Description of the error.
c                "   > [         TU ]  USS9  g )Nr   rK   rL   rM   s     r    r!   %PydanticInvalidForJsonSchema.__init__   rU   r#   r1   rO   rP   rG   s   @r    r   r      rV   r#   r   c                  N   ^  \ rS rSr% SrSSSSSSS	.rS
\S'   SU 4S jjrSrU =r	$ )r      zLAn error raised if a forbidden type qualifier is found in a type annotation.ztyping.Requiredztyping.NotRequiredztyping.ReadOnlyztyping.ClassVarzdataclasses.InitVarztyping.Final)requirednot_required	read_only	class_varinit_varfinalzClassVar[dict[Qualifier, str]]_qualifier_repr_mapc                v   > [         TU ]  S[        R                  " U5      < SU R                  U   < S3S S9  g )NzThe annotation z contains the z? type qualifier, which is invalid in the context it is defined.r   )r8   r!   r	   display_as_typerc   )r   	qualifier
annotationr9   s      r    r!   #PydanticForbiddenQualifier.__init__   sN    !%"7"7
"C!FnUYUmUmnwUxT{ |Q R  	 	
r#   r1   )rf   r   rg   r   r)   r*   )
r+   r,   r-   r.   r/   rc   __annotations__r!   r0   rF   rG   s   @r    r   r      s4    V &,&&);7 
 
r#   r   )"r/   
__future__r   _annotationsr=   typingr   r   r   typing_extensionsr   typing_inspection.introspectionr   pydantic._internalr	   
_migrationr   versionr   __all__r%   r   r   	TypeErrorr   rD   r   ImportErrorr   r   r   r   r+   __getattr__r1   r#   r    <module>rv      s     2 	 ) ) " 5 $ ) " 4MO3DCH 0(2 jf f&<*I <7"4i 7:7,k 7B$5 BB#4 B
!2 
,  )r#   