gdZddlmZddlZddlmZmZddlm Z ddl m Z dZ d e d Z ed ZGd d ZGddeeZGddeeZGddeeZGddeZGddeZe eZy)zPydantic-specific errors.) annotationsN)LiteralSelf)getattr_migration) version_short)PydanticUserErrorPydanticUndefinedAnnotationPydanticImportErrorPydanticSchemaGenerationErrorPydanticInvalidForJsonSchemaPydanticErrorCodeszhttps://errors.pydantic.dev/z/u/)*zclass-not-fully-definedzcustom-json-schemazdecorator-missing-fieldzdiscriminator-no-fieldzdiscriminator-alias-typezdiscriminator-needs-literalzdiscriminator-aliaszdiscriminator-validatorzcallable-discriminator-no-tagztyped-dict-versionzmodel-field-overriddenzmodel-field-missing-annotationz config-bothzremoved-kwargsinvalid-for-json-schemazjson-schema-already-usedzbase-model-instantiatedundefined-annotationschema-for-unknown-type import-errorzcreate-model-field-definitionszcreate-model-config-basezvalidator-no-fieldszvalidator-invalid-fieldszvalidator-instance-methodzroot-validator-pre-skipz model-serializer-instance-methodzvalidator-field-config-infozvalidator-v1-signaturezvalidator-signaturezfield-serializer-signaturezmodel-serializer-signaturezmultiple-field-serializersinvalid_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-modelc eZdZdZddZddZy)PydanticErrorMixinzA 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 ||_||_y)Nmessagecode)selfrrs >/opt/hc_python/lib/python3.12/site-packages/pydantic/errors.py__init__zPydanticErrorMixin.__init__Os  ct|j |jS|jdt|jS)Nz For further information visit )rrDEV_ERROR_DOCS_URL)rs r__str__zPydanticErrorMixin.__str__Ss: 99 << ll^#EFXEYZ^ZcZcYde erN)rstrrzPydanticErrorCodes | NonereturnNone)r"r!)__name__ __module__ __qualname____doc__rr rrrrGsfrrceZdZdZy)r z1An error raised due to incorrect use of Pydantic.N)r$r%r&r'r(rrr r Zs;rr c6eZdZdZdfd ZeddZxZS)r zA subclass of `NameError` raised when handling undefined annotations during `CoreSchema` generation. Attributes: name: Name of the error. message: Description of the error. c6||_t| |dy)Nrr)namesuperr)rr,r __class__s rrz$PydanticUndefinedAnnotation.__init__fs  /EFrc |j}||t |S#t$r1tjdt |j d}YLwxYw)zConvert a `NameError` to a `PydanticUndefinedAnnotation` error. Args: name_error: `NameError` to be converted. Returns: Converted `PydanticUndefinedAnnotation` error. z .*'(.+?)'r)r,r)r,AttributeErrorresearchr!group)cls name_errorr,s rfrom_name_errorz+PydanticUndefinedAnnotation.from_name_errorjsV E??Dc*o66 E99\3z?;AA!DD Es !7AA)r,r!rr!r"r#)r5 NameErrorr"r)r$r%r&r'r classmethodr6 __classcell__r.s@rr r ^s"G 7 7rr c$eZdZdZdfd ZxZS)r zAn error raised when an import fails due to module changes between V1 and V2. Attributes: message: Description of the error. c(t||dy)Nrrr-rrrr.s rrzPydanticImportError.__init__s ~6rrr!r"r#r$r%r&r'rr9r:s@rr r {s 77rr c$eZdZdZdfd ZxZS)r zAn error raised during failures to generate a `CoreSchema` for some type. Attributes: message: Description of the error. c(t||dy)Nrr=r>r?s rrz&PydanticSchemaGenerationError.__init__ '@Arr@rAr:s@rr r  BBrr c$eZdZdZdfd ZxZS)r zAn error raised during failures to generate a JSON schema for some `CoreSchema`. Attributes: message: Description of the error. c(t||dy)Nrr=r>r?s rrz%PydanticInvalidForJsonSchema.__init__rDrr@rAr:s@rr r rErr )r' __future__r _annotationsr1typing_extensionsrr _migrationrversionr__all__rrr TypeErrorr r7r ImportErrorr r r r$ __getattr__r(rrrQs2 +)" 4MO3DCH)+\ff&<*I<7"4i7:7,k7B$5BB#4B ) r