U
    nËj>E  ã                   @   s¬  d dl mZ d dlmZ d dlmZmZmZmZm	Z	m
Z
mZmZ d dlmZ er\d dlmZ dZed ddd	œd
d„ZG dd„ dƒZG dd„ deeƒZG dd„ deeƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd „ d eƒZG d!d"„ d"eƒZ G d#d$„ d$eƒZ!G d%d&„ d&eƒZ"G d'd(„ d(eƒZ#G d)d*„ d*e#ƒZ$G d+d,„ d,e#ƒZ%G d-d.„ d.e#ƒZ&G d/d0„ d0e#ƒZ'G d1d2„ d2e#ƒZ(G d3d4„ d4e#ƒZ)G d5d6„ d6e#ƒZ*G d7d8„ d8eƒZ+G d9d:„ d:eƒZ,G d;d<„ d<eƒZ-G d=d>„ d>eƒZ.G d?d@„ d@eƒZ/G dAdB„ dBe/ƒZ0G dCdD„ dDe/ƒZ1G dEdF„ dFe/ƒZ2G dGdH„ dHeƒZ3G dIdJ„ dJeƒZ4G dKdL„ dLeƒZ5G dMdN„ dNeƒZ6G dOdP„ dPeƒZ7G dQdR„ dReƒZ8G dSdT„ dTeƒZ9G dUdV„ dVeƒZ:G dWdX„ dXeƒZ;G dYdZ„ dZeƒZ<G d[d\„ d\eƒZ=G d]d^„ d^eƒZ>G d_d`„ d`eƒZ?G dadb„ dbeƒZ@G dcdd„ ddeƒZAG dedf„ dfeƒZBG dgdh„ dheƒZCG didj„ djeƒZDG dkdl„ dleƒZEG dmdn„ dneƒZFG dodp„ dpeƒZGG dqdr„ dreGƒZHG dsdt„ dteGƒZIG dudv„ dveGƒZJG dwdx„ dxeGƒZKG dydz„ dzeƒZLG d{d|„ d|eƒZMG d}d~„ d~eƒZNG dd€„ d€eƒZOG d�d‚„ d‚eƒZPG dƒd„„ d„eƒZQG d…d†„ d†eƒZRG d‡dˆ„ dˆeƒZSG d‰dŠ„ dŠeƒZTG d‹dŒ„ dŒeƒZUG d�dŽ„ dŽeƒZVG d�d�„ d�eƒZWG d‘d’„ d’eƒZXG d“d”„ d”eƒZYG d•d–„ d–eƒZZG d—d˜„ d˜eƒZ[G d™dš„ dšeƒZ\G d›dœ„ dœeƒZ]G d�dž„ džeƒZ^G dŸd „ d eƒZ_G d¡d¢„ d¢eƒZ`G d£d¤„ d¤eƒZaG d¥d¦„ d¦eƒZbG d§d¨„ d¨eƒZcG d©dª„ dªeƒZdG d«d¬„ d¬eƒZeG d­d®„ d®eƒZfG d¯d°„ d°eƒZgG d±d²„ d²eƒZhG d³d´„ d´eƒZiG dµd¶„ d¶eƒZjG d·d¸„ d¸eƒZkG d¹dº„ dºeƒZlG d»d¼„ d¼eƒZmG d½d¾„ d¾eƒZnG d¿dÀ„ dÀeƒZoG dÁdÂ„ dÂeƒZpG dÃdÄ„ dÄeƒZqG dÅdÆ„ dÆeƒZrG dÇdÈ„ dÈeƒZsG dÉdÊ„ dÊeƒZtG dËdÌ„ dÌeƒZuG dÍdÎ„ dÎeƒZvG dÏdÐ„ dÐeƒZwdÑS )Òé    )ÚDecimal)ÚPath)ÚTYPE_CHECKINGÚAnyÚCallableÚSequenceÚSetÚTupleÚTypeÚUnion)Údisplay_as_type)Ú
DictStrAny)]ÚPydanticTypeErrorÚPydanticValueErrorÚConfigErrorÚMissingErrorÚ
ExtraErrorÚNoneIsNotAllowedErrorÚNoneIsAllowedErrorÚWrongConstantErrorÚNotNoneErrorÚ	BoolErrorÚ
BytesErrorÚ	DictErrorÚ
EmailErrorÚUrlErrorÚUrlSchemeErrorÚUrlSchemePermittedErrorÚUrlUserInfoErrorÚUrlHostErrorÚUrlHostTldErrorÚUrlPortErrorÚUrlExtraErrorÚ	EnumErrorÚIntEnumErrorÚEnumMemberErrorÚIntegerErrorÚ
FloatErrorÚ	PathErrorÚPathNotExistsErrorÚPathNotAFileErrorÚPathNotADirectoryErrorÚPyObjectErrorÚSequenceErrorÚ	ListErrorÚSetErrorÚFrozenSetErrorÚ
TupleErrorÚTupleLengthErrorÚListMinLengthErrorÚListMaxLengthErrorÚListUniqueItemsErrorÚSetMinLengthErrorÚSetMaxLengthErrorÚFrozenSetMinLengthErrorÚFrozenSetMaxLengthErrorÚAnyStrMinLengthErrorÚAnyStrMaxLengthErrorÚStrErrorÚStrRegexErrorÚNumberNotGtErrorÚNumberNotGeErrorÚNumberNotLtErrorÚNumberNotLeErrorÚNumberNotMultipleErrorÚDecimalErrorÚDecimalIsNotFiniteErrorÚDecimalMaxDigitsErrorÚDecimalMaxPlacesErrorÚDecimalWholeDigitsErrorÚDateTimeErrorÚ	DateErrorÚDateNotInThePastErrorÚDateNotInTheFutureErrorÚ	TimeErrorÚDurationErrorÚHashableErrorÚ	UUIDErrorÚUUIDVersionErrorÚArbitraryTypeErrorÚ
ClassErrorÚSubclassErrorÚ	JsonErrorÚJsonTypeErrorÚPatternErrorÚDataclassTypeErrorÚCallableErrorÚIPvAnyAddressErrorÚIPvAnyInterfaceErrorÚIPvAnyNetworkErrorÚIPv4AddressErrorÚIPv6AddressErrorÚIPv4NetworkErrorÚIPv6NetworkErrorÚIPv4InterfaceErrorÚIPv6InterfaceErrorÚ
ColorErrorÚStrictBoolErrorÚNotDigitErrorÚLuhnValidationErrorÚInvalidLengthForBrandÚInvalidByteSizeÚInvalidByteSizeUnitÚMissingDiscriminatorÚInvalidDiscriminatorÚPydanticErrorMixinr   )ÚclsÚctxÚreturnc                 C   s
   | f |Ž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
    © )rl   rm   ro   ro   ú6/tmp/pip-unpacked-wheel-zvl9l234/pydantic/v1/errors.pyÚ
cls_kwargsl   s    rq   c                   @   sb   e Zd ZU eed< eed< eddœdd„Zedœdd	„Zee	d
 ee
d  df f dœdd„ZdS )rk   ÚcodeÚmsg_templateN)rm   rn   c                 K   s
   || _ d S ©N)Ú__dict__)Úselfrm   ro   ro   rp   Ú__init__{   s    zPydanticErrorMixin.__init__©rn   c                 C   s   | j jf | jŽS rt   )rs   Úformatru   ©rv   ro   ro   rp   Ú__str__~   s    zPydanticErrorMixin.__str__).rk   r   c                 C   s   t | j| jffS rt   )rq   Ú	__class__ru   rz   ro   ro   rp   Ú
__reduce__�   s    zPydanticErrorMixin.__reduce__)Ú__name__Ú
__module__Ú__qualname__ÚstrÚ__annotations__r   rw   r{   r	   r   r
   r}   ro   ro   ro   rp   rk   w   s
   
c                   @   s   e Zd ZdS )r   N©r~   r   r€   ro   ro   ro   rp   r   …   s   r   c                   @   s   e Zd ZdS )r   Nrƒ   ro   ro   ro   rp   r   ‰   s   r   c                   @   s   e Zd ZdS )r   Nrƒ   ro   ro   ro   rp   r   �   s   r   c                   @   s   e Zd ZdZdS )r   zfield requiredN©r~   r   r€   rs   ro   ro   ro   rp   r   ‘   s   r   c                   @   s   e Zd ZdZdS )r   zextra fields not permittedNr„   ro   ro   ro   rp   r   •   s   r   c                   @   s   e Zd ZdZdZdS )r   znone.not_allowedznone is not an allowed valueN©r~   r   r€   rr   rs   ro   ro   ro   rp   r   ™   s   r   c                   @   s   e Zd ZdZdZdS )r   znone.allowedzvalue is not noneNr…   ro   ro   ro   rp   r   ž   s   r   c                   @   s   e Zd ZdZedœdd„ZdS )r   Úconstrx   c                 C   s    d  dd„ | jD ƒ¡}d|› �S )Nú, c                 s   s   | ]}t |ƒV  qd S rt   )Úrepr©Ú.0Úvro   ro   rp   Ú	<genexpr>§   s     z-WrongConstantError.__str__.<locals>.<genexpr>zunexpected value; permitted: )ÚjoinÚ	permitted©rv   rŽ   ro   ro   rp   r{   ¦   s    zWrongConstantError.__str__N©r~   r   r€   rr   r�   r{   ro   ro   ro   rp   r   £   s   r   c                   @   s   e Zd ZdZdZdS )r   Znot_nonezvalue is not NoneNr…   ro   ro   ro   rp   r   «   s   r   c                   @   s   e Zd ZdZdS )r   z&value could not be parsed to a booleanNr„   ro   ro   ro   rp   r   °   s   r   c                   @   s   e Zd ZdZdS )r   zbyte type expectedNr„   ro   ro   ro   rp   r   ´   s   r   c                   @   s   e Zd ZdZdS )r   zvalue is not a valid dictNr„   ro   ro   ro   rp   r   ¸   s   r   c                   @   s   e Zd ZdZdS )r   z"value is not a valid email addressNr„   ro   ro   ro   rp   r   ¼   s   r   c                   @   s   e Zd ZdZdS )r   ÚurlN)r~   r   r€   rr   ro   ro   ro   rp   r   À   s   r   c                   @   s   e Zd ZdZdZdS )r   ú
url.schemezinvalid or missing URL schemeNr…   ro   ro   ro   rp   r   Ä   s   r   c                       s.   e Zd ZdZdZee dœ‡ fdd„Z‡  ZS )r   r’   zURL scheme not permitted©Úallowed_schemesc                    s   t ƒ j|d� d S )Nr“   ©Úsuperrw   )rv   r”   ©r|   ro   rp   rw   Í   s    z UrlSchemePermittedError.__init__)	r~   r   r€   rr   rs   r   r�   rw   Ú__classcell__ro   ro   r—   rp   r   É   s   r   c                   @   s   e Zd ZdZdZdS )r   zurl.userinfoz$userinfo required in URL but missingNr…   ro   ro   ro   rp   r   Ñ   s   r   c                   @   s   e Zd ZdZdZdS )r   úurl.hostzURL host invalidNr…   ro   ro   ro   rp   r   Ö   s   r   c                   @   s   e Zd ZdZdZdS )r    r™   z+URL host invalid, top level domain requiredNr…   ro   ro   ro   rp   r    Û   s   r    c                   @   s   e Zd ZdZdZdS )r!   zurl.portz*URL port invalid, port cannot exceed 65535Nr…   ro   ro   ro   rp   r!   à   s   r!   c                   @   s   e Zd ZdZdZdS )r"   z	url.extraz>URL invalid, extra characters found after valid URL: {extra!r}Nr…   ro   ro   ro   rp   r"   å   s   r"   c                   @   s   e Zd ZdZedœdd„ZdS )r%   Úenumrx   c                 C   s    d  dd„ | jD ƒ¡}d|› �S )Nr‡   c                 s   s   | ]}t |jƒV  qd S rt   )rˆ   Úvaluer‰   ro   ro   rp   rŒ   î   s     z*EnumMemberError.__str__.<locals>.<genexpr>z4value is not a valid enumeration member; permitted: )r�   Zenum_valuesr�   ro   ro   rp   r{   í   s    zEnumMemberError.__str__Nr�   ro   ro   ro   rp   r%   ê   s   r%   c                   @   s   e Zd ZdZdS )r&   zvalue is not a valid integerNr„   ro   ro   ro   rp   r&   ò   s   r&   c                   @   s   e Zd ZdZdS )r'   zvalue is not a valid floatNr„   ro   ro   ro   rp   r'   ö   s   r'   c                   @   s   e Zd ZdZdS )r(   zvalue is not a valid pathNr„   ro   ro   ro   rp   r(   ú   s   r(   c                       s$   e Zd Zeddœ‡ fdd„Z‡  ZS )Ú_PathValueErrorN)Úpathrn   c                   s   t ƒ jt|ƒd� d S )N)r�   )r–   rw   r�   )rv   r�   r—   ro   rp   rw   ÿ   s    z_PathValueError.__init__)r~   r   r€   r   rw   r˜   ro   ro   r—   rp   rœ   þ   s   rœ   c                   @   s   e Zd ZdZdZdS )r)   zpath.not_existsz1file or directory at path "{path}" does not existNr…   ro   ro   ro   rp   r)     s   r)   c                   @   s   e Zd ZdZdZdS )r*   zpath.not_a_filez&path "{path}" does not point to a fileNr…   ro   ro   ro   rp   r*     s   r*   c                   @   s   e Zd ZdZdZdS )r+   zpath.not_a_directoryz+path "{path}" does not point to a directoryNr…   ro   ro   ro   rp   r+     s   r+   c                   @   s   e Zd ZdZdS )r,   zOensure this value contains valid import path or valid callable: {error_message}Nr„   ro   ro   ro   rp   r,     s   r,   c                   @   s   e Zd ZdZdS )r-   zvalue is not a valid sequenceNr„   ro   ro   ro   rp   r-     s   r-   c                   @   s   e Zd ZdZdS )ÚIterableErrorzvalue is not a valid iterableNr„   ro   ro   ro   rp   rž     s   rž   c                   @   s   e Zd ZdZdS )r.   zvalue is not a valid listNr„   ro   ro   ro   rp   r.     s   r.   c                   @   s   e Zd ZdZdS )r/   zvalue is not a valid setNr„   ro   ro   ro   rp   r/   "  s   r/   c                   @   s   e Zd ZdZdS )r0   zvalue is not a valid frozensetNr„   ro   ro   ro   rp   r0   &  s   r0   c                   @   s   e Zd ZdZdS )Ú
DequeErrorzvalue is not a valid dequeNr„   ro   ro   ro   rp   rŸ   *  s   rŸ   c                   @   s   e Zd ZdZdS )r1   zvalue is not a valid tupleNr„   ro   ro   ro   rp   r1   .  s   r1   c                       s.   e Zd ZdZdZeeddœ‡ fdd„Z‡  ZS )r2   ztuple.lengthz>wrong tuple length {actual_length}, expected {expected_length}N)Úactual_lengthÚexpected_lengthrn   c                   s   t ƒ j||d� d S )N)r    r¡   r•   )rv   r    r¡   r—   ro   rp   rw   6  s    zTupleLengthError.__init__©r~   r   r€   rr   rs   Úintrw   r˜   ro   ro   r—   rp   r2   2  s   r2   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )r3   zlist.min_itemsú2ensure this value has at least {limit_value} itemsN©Úlimit_valuern   c                   s   t ƒ j|d� d S ©N)r¦   r•   ©rv   r¦   r—   ro   rp   rw   >  s    zListMinLengthError.__init__r¢   ro   ro   r—   rp   r3   :  s   r3   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )r4   zlist.max_itemsú1ensure this value has at most {limit_value} itemsNr¥   c                   s   t ƒ j|d� d S r§   r•   r¨   r—   ro   rp   rw   F  s    zListMaxLengthError.__init__r¢   ro   ro   r—   rp   r4   B  s   r4   c                   @   s   e Zd ZdZdZdS )r5   zlist.unique_itemszthe list has duplicated itemsNr…   ro   ro   ro   rp   r5   J  s   r5   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )r6   zset.min_itemsr¤   Nr¥   c                   s   t ƒ j|d� d S r§   r•   r¨   r—   ro   rp   rw   S  s    zSetMinLengthError.__init__r¢   ro   ro   r—   rp   r6   O  s   r6   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )r7   zset.max_itemsr©   Nr¥   c                   s   t ƒ j|d� d S r§   r•   r¨   r—   ro   rp   rw   [  s    zSetMaxLengthError.__init__r¢   ro   ro   r—   rp   r7   W  s   r7   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )r8   zfrozenset.min_itemsr¤   Nr¥   c                   s   t ƒ j|d� d S r§   r•   r¨   r—   ro   rp   rw   c  s    z FrozenSetMinLengthError.__init__r¢   ro   ro   r—   rp   r8   _  s   r8   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )r9   zfrozenset.max_itemsr©   Nr¥   c                   s   t ƒ j|d� d S r§   r•   r¨   r—   ro   rp   rw   k  s    z FrozenSetMaxLengthError.__init__r¢   ro   ro   r—   rp   r9   g  s   r9   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )r:   zany_str.min_lengthz7ensure this value has at least {limit_value} charactersNr¥   c                   s   t ƒ j|d� d S r§   r•   r¨   r—   ro   rp   rw   s  s    zAnyStrMinLengthError.__init__r¢   ro   ro   r—   rp   r:   o  s   r:   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )r;   zany_str.max_lengthz6ensure this value has at most {limit_value} charactersNr¥   c                   s   t ƒ j|d� d S r§   r•   r¨   r—   ro   rp   rw   {  s    zAnyStrMaxLengthError.__init__r¢   ro   ro   r—   rp   r;   w  s   r;   c                   @   s   e Zd ZdZdS )r<   zstr type expectedNr„   ro   ro   ro   rp   r<     s   r<   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )r=   z	str.regexz'string does not match regex "{pattern}"N)Úpatternrn   c                   s   t ƒ j|d� d S )N)rª   r•   )rv   rª   r—   ro   rp   rw   ‡  s    zStrRegexError.__init__)r~   r   r€   rr   rs   r�   rw   r˜   ro   ro   r—   rp   r=   ƒ  s   r=   c                       s.   e Zd Zeeeef ddœ‡ fdd„Z‡  ZS )Ú_NumberBoundErrorNr¥   c                   s   t ƒ j|d� d S r§   r•   r¨   r—   ro   rp   rw   Œ  s    z_NumberBoundError.__init__)	r~   r   r€   r   r£   Úfloatr   rw   r˜   ro   ro   r—   rp   r«   ‹  s   r«   c                   @   s   e Zd ZdZdZdS )r>   znumber.not_gtz/ensure this value is greater than {limit_value}Nr…   ro   ro   ro   rp   r>   �  s   r>   c                   @   s   e Zd ZdZdZdS )r?   znumber.not_gez;ensure this value is greater than or equal to {limit_value}Nr…   ro   ro   ro   rp   r?   •  s   r?   c                   @   s   e Zd ZdZdZdS )r@   znumber.not_ltz,ensure this value is less than {limit_value}Nr…   ro   ro   ro   rp   r@   š  s   r@   c                   @   s   e Zd ZdZdZdS )rA   znumber.not_lez8ensure this value is less than or equal to {limit_value}Nr…   ro   ro   ro   rp   rA   Ÿ  s   rA   c                   @   s   e Zd ZdZdZdS )ÚNumberNotFiniteErrorznumber.not_finite_numberz$ensure this value is a finite numberNr…   ro   ro   ro   rp   r­   ¤  s   r­   c                       s6   e Zd ZdZdZeeeef ddœ‡ fdd„Z	‡  Z
S )rB   znumber.not_multiplez0ensure this value is a multiple of {multiple_of}N)Úmultiple_ofrn   c                   s   t ƒ j|d� d S )N)r®   r•   )rv   r®   r—   ro   rp   rw   ­  s    zNumberNotMultipleError.__init__)r~   r   r€   rr   rs   r   r£   r¬   r   rw   r˜   ro   ro   r—   rp   rB   ©  s   rB   c                   @   s   e Zd ZdZdS )rC   úvalue is not a valid decimalNr„   ro   ro   ro   rp   rC   ±  s   rC   c                   @   s   e Zd ZdZdZdS )rD   zdecimal.not_finiter¯   Nr…   ro   ro   ro   rp   rD   µ  s   rD   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )rE   zdecimal.max_digitsz?ensure that there are no more than {max_digits} digits in totalN)Ú
max_digitsrn   c                   s   t ƒ j|d� d S )N)r°   r•   )rv   r°   r—   ro   rp   rw   ¾  s    zDecimalMaxDigitsError.__init__r¢   ro   ro   r—   rp   rE   º  s   rE   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )rF   zdecimal.max_placeszBensure that there are no more than {decimal_places} decimal placesN)Údecimal_placesrn   c                   s   t ƒ j|d� d S )N)r±   r•   )rv   r±   r—   ro   rp   rw   Æ  s    zDecimalMaxPlacesError.__init__r¢   ro   ro   r—   rp   rF   Â  s   rF   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )rG   zdecimal.whole_digitszQensure that there are no more than {whole_digits} digits before the decimal pointN)Úwhole_digitsrn   c                   s   t ƒ j|d� d S )N)r²   r•   )rv   r²   r—   ro   rp   rw   Î  s    z DecimalWholeDigitsError.__init__r¢   ro   ro   r—   rp   rG   Ê  s   rG   c                   @   s   e Zd ZdZdS )rH   zinvalid datetime formatNr„   ro   ro   ro   rp   rH   Ò  s   rH   c                   @   s   e Zd ZdZdS )rI   zinvalid date formatNr„   ro   ro   ro   rp   rI   Ö  s   rI   c                   @   s   e Zd ZdZdZdS )rJ   zdate.not_in_the_pastzdate is not in the pastNr…   ro   ro   ro   rp   rJ   Ú  s   rJ   c                   @   s   e Zd ZdZdZdS )rK   zdate.not_in_the_futurezdate is not in the futureNr…   ro   ro   ro   rp   rK   ß  s   rK   c                   @   s   e Zd ZdZdS )rL   zinvalid time formatNr„   ro   ro   ro   rp   rL   ä  s   rL   c                   @   s   e Zd ZdZdS )rM   zinvalid duration formatNr„   ro   ro   ro   rp   rM   è  s   rM   c                   @   s   e Zd ZdZdS )rN   zvalue is not a valid hashableNr„   ro   ro   ro   rp   rN   ì  s   rN   c                   @   s   e Zd ZdZdS )rO   zvalue is not a valid uuidNr„   ro   ro   ro   rp   rO   ð  s   rO   c                       s,   e Zd ZdZdZeddœ‡ fdd„Z‡  ZS )rP   zuuid.versionz(uuid version {required_version} expectedN)Úrequired_versionrn   c                   s   t ƒ j|d� d S )N)r³   r•   )rv   r³   r—   ro   rp   rw   ø  s    zUUIDVersionError.__init__r¢   ro   ro   r—   rp   rP   ô  s   rP   c                       s0   e Zd ZdZdZee ddœ‡ fdd„Z‡  ZS )rQ   Zarbitrary_typez.instance of {expected_arbitrary_type} expectedN)Úexpected_arbitrary_typern   c                   s   t ƒ jt|ƒd� d S )N)r´   ©r–   rw   r   )rv   r´   r—   ro   rp   rw      s    zArbitraryTypeError.__init__©	r~   r   r€   rr   rs   r
   r   rw   r˜   ro   ro   r—   rp   rQ   ü  s   rQ   c                   @   s   e Zd ZdZdZdS )rR   Úclassza class is expectedNr…   ro   ro   ro   rp   rR     s   rR   c                       s0   e Zd ZdZdZee ddœ‡ fdd„Z‡  ZS )rS   Úsubclassz%subclass of {expected_class} expectedN)Úexpected_classrn   c                   s   t ƒ jt|ƒd� d S )N)r¹   rµ   )rv   r¹   r—   ro   rp   rw     s    zSubclassError.__init__r¶   ro   ro   r—   rp   rS   	  s   rS   c                   @   s   e Zd ZdZdS )rT   zInvalid JSONNr„   ro   ro   ro   rp   rT     s   rT   c                   @   s   e Zd ZdZdZdS )rU   Újsonz+JSON object must be str, bytes or bytearrayNr…   ro   ro   ro   rp   rU     s   rU   c                   @   s   e Zd ZdZdZdS )rV   Zregex_patternzInvalid regular expressionNr…   ro   ro   ro   rp   rV     s   rV   c                   @   s   e Zd ZdZdZdS )rW   Z	dataclassz0instance of {class_name}, tuple or dict expectedNr…   ro   ro   ro   rp   rW     s   rW   c                   @   s   e Zd ZdZdS )rX   z{value} is not callableNr„   ro   ro   ro   rp   rX   $  s   rX   c                   @   s   e Zd ZdZdZdS )r#   Zenum_instancez${value} is not a valid Enum instanceNr…   ro   ro   ro   rp   r#   (  s   r#   c                   @   s   e Zd ZdZdZdS )r$   Zint_enum_instancez'{value} is not a valid IntEnum instanceNr…   ro   ro   ro   rp   r$   -  s   r$   c                   @   s   e Zd ZdZdS )rY   z)value is not a valid IPv4 or IPv6 addressNr„   ro   ro   ro   rp   rY   2  s   rY   c                   @   s   e Zd ZdZdS )rZ   z+value is not a valid IPv4 or IPv6 interfaceNr„   ro   ro   ro   rp   rZ   6  s   rZ   c                   @   s   e Zd ZdZdS )r[   z)value is not a valid IPv4 or IPv6 networkNr„   ro   ro   ro   rp   r[   :  s   r[   c                   @   s   e Zd ZdZdS )r\   z!value is not a valid IPv4 addressNr„   ro   ro   ro   rp   r\   >  s   r\   c                   @   s   e Zd ZdZdS )r]   z!value is not a valid IPv6 addressNr„   ro   ro   ro   rp   r]   B  s   r]   c                   @   s   e Zd ZdZdS )r^   z!value is not a valid IPv4 networkNr„   ro   ro   ro   rp   r^   F  s   r^   c                   @   s   e Zd ZdZdS )r_   z!value is not a valid IPv6 networkNr„   ro   ro   ro   rp   r_   J  s   r_   c                   @   s   e Zd ZdZdS )r`   z#value is not a valid IPv4 interfaceNr„   ro   ro   ro   rp   r`   N  s   r`   c                   @   s   e Zd ZdZdS )ra   z#value is not a valid IPv6 interfaceNr„   ro   ro   ro   rp   ra   R  s   ra   c                   @   s   e Zd ZdZdS )rb   z$value is not a valid color: {reason}Nr„   ro   ro   ro   rp   rb   V  s   rb   c                   @   s   e Zd ZdZdS )rc   zvalue is not a valid booleanNr„   ro   ro   ro   rp   rc   Z  s   rc   c                   @   s   e Zd ZdZdZdS )rd   zpayment_card_number.digitszcard number is not all digitsNr…   ro   ro   ro   rp   rd   ^  s   rd   c                   @   s   e Zd ZdZdZdS )re   zpayment_card_number.luhn_checkzcard number is not luhn validNr…   ro   ro   ro   rp   re   c  s   re   c                   @   s   e Zd ZdZdZdS )rf   z,payment_card_number.invalid_length_for_brandz3Length for a {brand} card must be {required_length}Nr…   ro   ro   ro   rp   rf   h  s   rf   c                   @   s   e Zd ZdZdS )rg   z/could not parse value and unit from byte stringNr„   ro   ro   ro   rp   rg   m  s   rg   c                   @   s   e Zd ZdZdS )rh   z%could not interpret byte unit: {unit}Nr„   ro   ro   ro   rp   rh   q  s   rh   c                   @   s   e Zd ZdZdZdS )ri   z)discriminated_union.missing_discriminatorz7Discriminator {discriminator_key!r} is missing in valueNr…   ro   ro   ro   rp   ri   u  s   ri   c                       s4   e Zd ZdZdZeeee ddœ‡ fdd„Z‡  Z	S )rj   z)discriminated_union.invalid_discriminatorzuNo match for discriminator {discriminator_key!r} and value {discriminator_value!r} (allowed values: {allowed_values})N)Údiscriminator_keyÚdiscriminator_valueÚallowed_valuesrn   c                   s"   t ƒ j||d tt|ƒ¡d� d S )Nr‡   )r»   r¼   r½   )r–   rw   r�   Úmaprˆ   )rv   r»   r¼   r½   r—   ro   rp   rw   �  s
    ýzInvalidDiscriminator.__init__)
r~   r   r€   rr   rs   r�   r   r   rw   r˜   ro   ro   r—   rp   rj   z  s   ÿrj   N)xÚdecimalr   Úpathlibr   Útypingr   r   r   r   r   r	   r
   r   Zpydantic.v1.typingr   r   Ú__all__rq   rk   Ú	TypeErrorr   Ú
ValueErrorr   ÚRuntimeErrorr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r%   r&   r'   r(   rœ   r)   r*   r+   r,   r-   rž   r.   r/   r0   rŸ   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r«   r>   r?   r@   rA   r­   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   r#   r$   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   ro   ro   ro   rp   Ú<module>   sÔ   (a