fL i>E ddlmZddlmZddlmZmZmZmZm Z m Z m Z m Z ddl mZerddl mZdZde dd d d dfd ZGd dZGddeeZGddeeZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGd d!eZGd"d#eZ Gd$d%eZ!Gd&d'eZ"Gd(d)eZ#Gd*d+e#Z$Gd,d-e#Z%Gd.d/e#Z&Gd0d1e#Z'Gd2d3e#Z(Gd4d5e#Z)Gd6d7e#Z*Gd8d9eZ+Gd:d;eZ,Gd<d=eZ-Gd>d?eZ.Gd@dAeZ/GdBdCe/Z0GdDdEe/Z1GdFdGe/Z2GdHdIeZ3GdJdKeZ4GdLdMeZ5GdNdOeZ6GdPdQeZ7GdRdSeZ8GdTdUeZ9GdVdWeZ:GdXdYeZ;GdZd[eZ<Gd\d]eZ=Gd^d_eZ>Gd`daeZ?GdbdceZ@GdddeeZAGdfdgeZBGdhdieZCGdjdkeZDGdldmeZEGdndoeZFGdpdqeZGGdrdseGZHGdtdueGZIGdvdweGZJGdxdyeGZKGdzd{eZLGd|d}eZMGd~deZNGddeZOGddeZPGddeZQGddeZRGddeZSGddeZTGddeZUGddeZVGddeZWGddeZXGddeZYGddeZZGddeZ[GddeZ\GddeZ]GddeZ^GddeZ_GddeZ`GddeZaGddeZbGddeZcGddeZdGddeZeGddeZfGddeZgGddeZhGddeZiGddeZjGddeZkGddeZlGddeZmGddeZnGddeZoGd„deZpGdĄdeZqGdƄdeZrGdȄdeZsGdʄdeZtGd̄deZuGd΄deZvGdЄdeZwy))Decimal)Path) TYPE_CHECKINGAnyCallableSequenceSetTupleTypeUnion)display_as_type) DictStrAny)]PydanticTypeErrorPydanticValueError ConfigError MissingError ExtraErrorNoneIsNotAllowedErrorNoneIsAllowedErrorWrongConstantError NotNoneError BoolError BytesError DictError EmailErrorUrlErrorUrlSchemeErrorUrlSchemePermittedErrorUrlUserInfoError UrlHostErrorUrlHostTldError UrlPortError UrlExtraError EnumError IntEnumErrorEnumMemberError IntegerError FloatError PathErrorPathNotExistsErrorPathNotAFileErrorPathNotADirectoryError PyObjectError SequenceError ListErrorSetErrorFrozenSetError TupleErrorTupleLengthErrorListMinLengthErrorListMaxLengthErrorListUniqueItemsErrorSetMinLengthErrorSetMaxLengthErrorFrozenSetMinLengthErrorFrozenSetMaxLengthErrorAnyStrMinLengthErrorAnyStrMaxLengthErrorStrError StrRegexErrorNumberNotGtErrorNumberNotGeErrorNumberNotLtErrorNumberNotLeErrorNumberNotMultipleError DecimalErrorDecimalIsNotFiniteErrorDecimalMaxDigitsErrorDecimalMaxPlacesErrorDecimalWholeDigitsError DateTimeError DateErrorDateNotInThePastErrorDateNotInTheFutureError TimeError DurationError HashableError UUIDErrorUUIDVersionErrorArbitraryTypeError ClassError SubclassError JsonError JsonTypeError PatternErrorDataclassTypeError CallableErrorIPvAnyAddressErrorIPvAnyInterfaceErrorIPvAnyNetworkErrorIPv4AddressErrorIPv6AddressErrorIPv4NetworkErrorIPv6NetworkErrorIPv4InterfaceErrorIPv6InterfaceError ColorErrorStrictBoolError NotDigitErrorLuhnValidationErrorInvalidLengthForBrandInvalidByteSizeInvalidByteSizeUnitMissingDiscriminatorInvalidDiscriminatorclsPydanticErrorMixinctxrreturnc|di|S)a For built-in exceptions like ValueError or TypeError, we need to implement __reduce__ to override the default behaviour (instead of __getstate__/__setstate__) By default pickle protocol 2 calls `cls.__new__(cls, *args)`. Since we only use kwargs, we need a little constructor to change that. Note: the callable can't be a lambda as pickle looks in the namespace to find it rq)rlrns X/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/pydantic/v1/errors.py cls_kwargsrsls ::cjeZdZUeed<eed<deddfdZdefdZdee dee dd fffd Z y) rmcode msg_templaternroNc ||_yN)__dict__)selfrns rr__init__zPydanticErrorMixin.__init__{s  rtcN|jjdi|jS)Nrq)rwformatrzr{s rr__str__zPydanticErrorMixin.__str__~s"'t  ''8$--88rt).rmrc>t|j|jffSry)rs __class__rzrs rr __reduce__zPydanticErrorMixin.__reduce__sDNNDMM:::rt) __name__ __module__ __qualname__str__annotations__rr|rr rr rrqrtrrrmrmwsY Icd99;E(+D"EuTRfMgiuMuGv"vw;rtc eZdZy)rNrrrrqrtrrrrrtrc eZdZy)rNrrqrtrrrrrrtrc eZdZy)rNrrqrtrrrrrrtrceZdZdZy)rzfield requiredNrrrrwrqrtrrrrs#LrtrceZdZdZy)rzextra fields not permittedNrrqrtrrrr/LrtrceZdZdZdZy)rznone.not_allowedznone is not an allowed valueNrrrrvrwrqrtrrrrs D1LrtrceZdZdZdZy)rz none.allowedzvalue is not noneNrrqrtrrrrs D&LrtrceZdZdZdefdZy)rconstrocPdjd|jD}d|S)N, c32K|]}t|ywry)repr.0vs rr z-WrongConstantError.__str__..s>!d1g>szunexpected value; permitted: )join permittedr{rs rrrzWrongConstantError.__str__s'II>t~~>> .yk::rtNrrrrvrrrqrtrrrrs D;;rtrceZdZdZdZy)rnot_nonezvalue is not NoneNrrqrtrrrrs D&LrtrceZdZdZy)rz&value could not be parsed to a booleanNrrqrtrrrrs;LrtrceZdZdZy)rzbyte type expectedNrrqrtrrrrs'LrtrceZdZdZy)rzvalue is not a valid dictNrrqrtrrrr.LrtrceZdZdZy)rz"value is not a valid email addressNrrqrtrrrrs7LrtrceZdZdZy)rurlN)rrrrvrqrtrrrrs DrtrceZdZdZdZy)r url.schemezinvalid or missing URL schemeNrrqrtrrrrs D2Lrtrc2eZdZdZdZdeeffd ZxZS)rrzURL scheme not permittedallowed_schemesc&t||y)N)rsuperr|)r{rrs rrr|z UrlSchemePermittedError.__init__s 9rt) rrrrvrwr rr| __classcell__rs@rrrrs" D-L:C::rtrceZdZdZdZy)rz url.userinfoz$userinfo required in URL but missingNrrqrtrrrrs D9LrtrceZdZdZdZy)r url.hostzURL host invalidNrrqrtrrr r s D%Lrtr ceZdZdZdZy)r!rz+URL host invalid, top level domain requiredNrrqrtrrr!r!s D@Lrtr!ceZdZdZdZy)r"zurl.portz*URL port invalid, port cannot exceed 65535Nrrqrtrrr"r"s D?Lrtr"ceZdZdZdZy)r#z url.extraz>URL invalid, extra characters found after valid URL: {extra!r}Nrrqrtrrr#r#s DSLrtr#ceZdZdZdefdZy)r&enumrocPdjd|jD}d|S)Nrc3FK|]}t|jywry)rvaluers rrrz*EnumMemberError.__str__..sFd177mFs!z4value is not a valid enumeration member; permitted: )r enum_valuesrs rrrzEnumMemberError.__str__s)IIFT5E5EFF Ei[QQrtNrrqrtrrr&r&s DRRrtr&ceZdZdZy)r'zvalue is not a valid integerNrrqrtrrr'r'1Lrtr'ceZdZdZy)r(zvalue is not a valid floatNrrqrtrrr(r(rrtr(ceZdZdZy)r)zvalue is not a valid pathNrrqrtrrr)r)rrtr)c(eZdZdeddffd ZxZS)_PathValueErrorpathroNc8t|t|y)N)r)rr|r)r{rrs rrr|z_PathValueError.__init__s c$i(rt)rrrrr|rrs@rrrrs))))rtrceZdZdZdZy)r*zpath.not_existsz1file or directory at path "{path}" does not existNrrqrtrrr*r*s DFLrtr*ceZdZdZdZy)r+zpath.not_a_filez&path "{path}" does not point to a fileNrrqrtrrr+r+s D;Lrtr+ceZdZdZdZy)r,zpath.not_a_directoryz+path "{path}" does not point to a directoryNrrqrtrrr,r, s !D@Lrtr,ceZdZdZy)r-zOensure this value contains valid import path or valid callable: {error_message}Nrrqrtrrr-r-sdLrtr-ceZdZdZy)r.zvalue is not a valid sequenceNrrqrtrrr.r.2Lrtr.ceZdZdZy) IterableErrorzvalue is not a valid iterableNrrqrtrrrrrrtrceZdZdZy)r/zvalue is not a valid listNrrqrtrrr/r/rrtr/ceZdZdZy)r0zvalue is not a valid setNrrqrtrrr0r0"s-Lrtr0ceZdZdZy)r1zvalue is not a valid frozensetNrrqrtrrr1r1&s3Lrtr1ceZdZdZy) DequeErrorzvalue is not a valid dequeNrrqrtrrrr*rrtrceZdZdZy)r2zvalue is not a valid tupleNrrqrtrrr2r2.rrtr2c4eZdZdZdZdededdffd ZxZS)r3z tuple.lengthz>wrong tuple length {actual_length}, expected {expected_length} actual_lengthexpected_lengthroNc(t|||y)N)rrr)r{rrrs rrr|zTupleLengthError.__init__6s }oVrtrrrrvrwintr|rrs@rrr3r32s1 DSLWWsWtWWrtr3c0eZdZdZdZdeddffd ZxZS)r4zlist.min_items2ensure this value has at least {limit_value} items limit_valueroNc&t||yN)rrr{rrs rrr|zListMinLengthError.__init__> [1rtrrs@rrr4r4:s% DGL2s2t22rtr4c0eZdZdZdZdeddffd ZxZS)r5zlist.max_items1ensure this value has at most {limit_value} itemsrroNc&t||yrrrs rrr|zListMaxLengthError.__init__Frrtrrs@rrr5r5Bs% DFL2s2t22rtr5ceZdZdZdZy)r6zlist.unique_itemszthe list has duplicated itemsNrrqrtrrr6r6Js D2Lrtr6c0eZdZdZdZdeddffd ZxZS)r7z set.min_itemsrrroNc&t||yrrrs rrr|zSetMinLengthError.__init__Srrtrrs@rrr7r7Os% DGL2s2t22rtr7c0eZdZdZdZdeddffd ZxZS)r8z set.max_itemsrrroNc&t||yrrrs rrr|zSetMaxLengthError.__init__[rrtrrs@rrr8r8Ws% DFL2s2t22rtr8c0eZdZdZdZdeddffd ZxZS)r9zfrozenset.min_itemsrrroNc&t||yrrrs rrr|z FrozenSetMinLengthError.__init__crrtrrs@rrr9r9_s% DGL2s2t22rtr9c0eZdZdZdZdeddffd ZxZS)r:zfrozenset.max_itemsrrroNc&t||yrrrs rrr|z FrozenSetMaxLengthError.__init__krrtrrs@rrr:r:gs% DFL2s2t22rtr:c0eZdZdZdZdeddffd ZxZS)r;zany_str.min_lengthz7ensure this value has at least {limit_value} charactersrroNc&t||yrrrs rrr|zAnyStrMinLengthError.__init__srrtrrs@rrr;r;os% DLL2s2t22rtr;c0eZdZdZdZdeddffd ZxZS)r<zany_str.max_lengthz6ensure this value has at most {limit_value} charactersrroNc&t||yrrrs rrr|zAnyStrMaxLengthError.__init__{rrtrrs@rrr<r<ws% DKL2s2t22rtr<ceZdZdZy)r=zstr type expectedNrrqrtrrr=r=s&Lrtr=c0eZdZdZdZdeddffd ZxZS)r>z str.regexz'string does not match regex "{pattern}"patternroNc&t||y)N)rr)r{rrs rrr|zStrRegexError.__init__s )rt)rrrrvrwrr|rrs@rrr>r>s% Dc4eZdZdeeeefddffd ZxZS)_NumberBoundErrorrroNc&t||yrrrs rrr|z_NumberBoundError.__init__rrt) rrrr rfloatrr|rrs@rrrrs'2uS%-@'A2d22rtrceZdZdZdZy)r?z number.not_gtz/ensure this value is greater than {limit_value}Nrrqrtrrr?r?s DDLrtr?ceZdZdZdZy)r@z number.not_gez;ensure this value is greater than or equal to {limit_value}Nrrqrtrrr@r@s DPLrtr@ceZdZdZdZy)rAz number.not_ltz,ensure this value is less than {limit_value}NrrqrtrrrArAs DALrtrAceZdZdZdZy)rBz number.not_lez8ensure this value is less than or equal to {limit_value}NrrqrtrrrBrBs DMLrtrBceZdZdZdZy)NumberNotFiniteErrorznumber.not_finite_numberz$ensure this value is a finite numberNrrqrtrrrrs %D9Lrtrc<eZdZdZdZdeeeefddffd Z xZ S)rCznumber.not_multiplez0ensure this value is a multiple of {multiple_of} multiple_ofroNc&t||y)N)rr)r{rrs rrr|zNumberNotMultipleError.__init__rrt) rrrrvrwr rrrr|rrs@rrrCrCs1 DEL2uS%-@'A2d22rtrCceZdZdZy)rDvalue is not a valid decimalNrrqrtrrrDrDrrtrDceZdZdZdZy)rEzdecimal.not_finiterNrrqrtrrrErEs D1LrtrEc0eZdZdZdZdeddffd ZxZS)rFzdecimal.max_digitsz?ensure that there are no more than {max_digits} digits in total max_digitsroNc&t||y)N)r r)r{r rs rrr|zDecimalMaxDigitsError.__init__s J/rtrrs@rrrFrFs% DTL0c0d00rtrFc0eZdZdZdZdeddffd ZxZS)rGzdecimal.max_placeszBensure that there are no more than {decimal_places} decimal placesdecimal_placesroNc&t||y)N)r r)r{r rs rrr|zDecimalMaxPlacesError.__init__s 7rtrrs@rrrGrGs% DWL8#8$88rtrGc0eZdZdZdZdeddffd ZxZS)rHzdecimal.whole_digitszQensure that there are no more than {whole_digits} digits before the decimal point whole_digitsroNc&t||y)N)rr)r{rrs rrr|z DecimalWholeDigitsError.__init__s l3rtrrs@rrrHrHs% !DfL4444rtrHceZdZdZy)rIzinvalid datetime formatNrrqrtrrrIrI,LrtrIceZdZdZy)rJzinvalid date formatNrrqrtrrrJrJ(LrtrJceZdZdZdZy)rKzdate.not_in_the_pastzdate is not in the pastNrrqrtrrrKrKs !D,LrtrKceZdZdZdZy)rLzdate.not_in_the_futurezdate is not in the futureNrrqrtrrrLrLs #D.LrtrLceZdZdZy)rMzinvalid time formatNrrqrtrrrMrMrrtrMceZdZdZy)rNzinvalid duration formatNrrqrtrrrNrNrrtrNceZdZdZy)rOzvalue is not a valid hashableNrrqrtrrrOrOrrtrOceZdZdZy)rPzvalue is not a valid uuidNrrqrtrrrPrPrrtrPc0eZdZdZdZdeddffd ZxZS)rQz uuid.versionz(uuid version {required_version} expectedrequired_versionroNc&t||y)N)rr)r{rrs rrr|zUUIDVersionError.__init__s *:;rtrrs@rrrQrQs% D=LLrtrZceZdZdZy)r[z+value is not a valid IPv4 or IPv6 interfaceNrrqrtrrr[r[6s@Lrtr[ceZdZdZy)r\z)value is not a valid IPv4 or IPv6 networkNrrqrtrrr\r\:r7rtr\ceZdZdZy)r]z!value is not a valid IPv4 addressNrrqrtrrr]r]>6Lrtr]ceZdZdZy)r^z!value is not a valid IPv6 addressNrrqrtrrr^r^Br;rtr^ceZdZdZy)r_z!value is not a valid IPv4 networkNrrqrtrrr_r_Fr;rtr_ceZdZdZy)r`z!value is not a valid IPv6 networkNrrqrtrrr`r`Jr;rtr`ceZdZdZy)raz#value is not a valid IPv4 interfaceNrrqrtrrraraN8LrtraceZdZdZy)rbz#value is not a valid IPv6 interfaceNrrqrtrrrbrbRr@rtrbceZdZdZy)rcz$value is not a valid color: {reason}NrrqrtrrrcrcVs9LrtrcceZdZdZy)rdzvalue is not a valid booleanNrrqrtrrrdrdZrrtrdceZdZdZdZy)rezpayment_card_number.digitszcard number is not all digitsNrrqrtrrrere^s 'D2LrtreceZdZdZdZy)rfzpayment_card_number.luhn_checkzcard number is not luhn validNrrqrtrrrfrfcs +D2LrtrfceZdZdZdZy)rgz,payment_card_number.invalid_length_for_brandz3Length for a {brand} card must be {required_length}Nrrqrtrrrgrghs 9DHLrtrgceZdZdZy)rhz/could not parse value and unit from byte stringNrrqrtrrrhrhmsDLrtrhceZdZdZy)riz%could not interpret byte unit: {unit}Nrrqrtrrririqs:LrtriceZdZdZdZy)rjz)discriminated_union.missing_discriminatorz7Discriminator {discriminator_key!r} is missing in valueNrrqrtrrrjrjus 6DLLrtrjc>eZdZdZdZdededeeddffd ZxZ S) rkz)discriminated_union.invalid_discriminatorzuNo match for discriminator {discriminator_key!r} and value {discriminator_value!r} (allowed values: {allowed_values})discriminator_keydiscriminator_valueallowed_valuesroNc dt|||djtt|y)Nr)rKrLrM)rr|rmapr)r{rKrLrMrs rrr|zInvalidDiscriminator.__init__s. / 399S~%>?  rt) rrrrvrwrrrr|rrs@rrrkrkzs@ 6D -  S s \deh\i nr  rtrkN)xdecimalrpathlibrtypingrrrrr r r r pydantic.v1.typingr r__all__rsrm TypeErrorr ValueErrorr RuntimeErrorrrrrrrrrrrrrrrrr r!r"r#r&r'r(r)rr*r+r,r-r.rr/r0r1rr2r3r4r5r6r7r8r9r:r;r<r=r>rr?r@rArBrrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYr$r%rZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrqrtrrrXslRRR.-^ BD-.\FZ ; ; *I  +Z  , $%$0#02-2 '*' ;+;'$' <!<("(/!/8#8!3X3 :h::x: &8& AhA @8@ THT R'R2$20"0/!/)() GG << A_A e%e3%33%3/!/. .4&40"00"0W)W2+22+23-3 2*22*22022022-22-2' '*&*2*2 E(E Q(Q B(B N(N :-: 2/22$2202 0.08.8404-&-)")-.- /0/ )")-&-3%3/!/<)<[*[)") I%I"""A%A 0%0 F*F -%-:!: =$= ?+?A-A?+?7)77)77)77)79+99+9:#:2(23&3 3,3 I.I E(E;,;M-M  -  rt