grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a àMÒekã@s>ddlZddlmZmZmZeddd�ZGdd„dejƒZdS)éN)ÚTypeÚTypeVarÚUnionÚTIntEnumÚIntEnum)Úboundc@sÂeZdZedd„ƒZedd„ƒZeeeeedœdd„ƒZ eeee edœd d „ƒZ eeee e efedœd d „ƒZ ed d„ƒZedd„ƒZedd„ƒZedd„ƒZedd„ƒZedd„ƒZdS)rcCs>| |¡t ||¡}| |d¡p0| ¡›|›�|_||_|S©N)Ú _check_valueÚintÚ__new__Ú_extra_to_textÚ_prefixÚ_name_Ú_value_)ÚclsÚvalueÚval©rú,/usr/lib/python3.9/site-packages/dns/enum.pyÚ _missing_s   zIntEnum._missing_cCsD| ¡}t|tƒst‚|dks&||kr@| ¡}t|›d|›�ƒ‚dS)Nrz$ must be an int between >= 0 and <= )Ú_maximumÚ isinstancer Ú TypeErrorÚ _short_nameÚ ValueError)rrÚmaxÚnamerrrr !s  zIntEnum._check_value)rÚtextÚreturncCsª| ¡}z ||WSty$Yn0| |¡}|r8|S| ¡}| |¡rž|t|ƒd… ¡ržt|t|ƒd…ƒ}| |¡z ||ƒWSt yœ|YS0|  ¡‚dSr) ÚupperÚKeyErrorÚ_extra_from_textr Ú startswithÚlenÚisdigitr r rÚ_unknown_exception_class)rrrÚprefixrrrÚ from_text*s"       zIntEnum.from_text)rrrcCsX| |¡z||ƒj}Wnty.d}Yn0| ||¡}|durT| ¡›|›�}|Sr)r rrr r )rrrrrrÚto_text>s    zIntEnum.to_textcCs&t|tƒr| |¡S| |¡||ƒS)a¥Convert text or a value into an enumerated type, if possible. *value*, the ``int`` or ``str`` to convert. Raises a class-specific exception if a ``str`` is provided that cannot be converted. Raises ``ValueError`` if the value is out of range. Returns an enumeration from the calling class corresponding to the value, if one is defined, or an ``int`` otherwise. )rÚstrr'r )rrrrrÚmakeJs   z IntEnum.makecCst‚dSr)ÚNotImplementedError©rrrrr^szIntEnum._maximumcCs |j ¡Sr)Ú__name__Úlowerr,rrrrbszIntEnum._short_namecCsdS)NÚrr,rrrr fszIntEnum._prefixcCsdSrr)rrrrrr!jszIntEnum._extra_from_textcCs|Srr)rrZ current_textrrrr nszIntEnum._extra_to_textcCstSr)rr,rrrr%rsz IntEnum._unknown_exception_classN)r-Ú __module__Ú __qualname__Ú classmethodrr rrr)r'r r(rr*rrr r!r r%rrrrrs,         )ÚenumÚtypingrrrrrrrrrÚs