fk^ddlZddlmZmZmZeddZGddej Zy)N)TypeTypeVarUnionTIntEnumIntEnum)boundceZdZedZedZedeededefdZ edeede defdZ edeede e efdefd Z ed Zed Zed Zed ZedZedZy)rc|j|tj||}|j|dxs|j ||_||_|SN) _check_valueint__new___extra_to_text_prefix_name__value_)clsvaluevals Q/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/dns/enum.py _missing_zIntEnum._missing_sT kk#u%''t4Q3;;=/%8Q   c|j}t|tst|dks||kDr |j }t |d|y)Nrz$ must be an int between >= 0 and <= )_maximum isinstancer TypeError _short_name ValueError)rrmaxnames rr zIntEnum._check_value!sQlln%%O 19 ??$Dv%I#OP P$rrtextreturnc|j} ||S#t$rYnwxYw|j|}|r|S|j}|j |r^|t |dj rBt|t |d}|j| ||S#t$r|cYSwxYw|jr ) upperKeyError_extra_from_textr startswithlenisdigitr r r_unknown_exception_class)rr!rprefixs r from_textzIntEnum.from_text*szz| t9    $$T* L ??6 "tCKM':'B'B'DS[]+,E   U # 5z!   **,,s ##!B)) B76B7rc|j| ||j}|j||}||j |}|S#t$rd}Y7wxYwr )r r rrr)rrr!s rto_textzIntEnum.to_text>sj  u:??D!!%. <kkm_UG,D  D sA AAcvt|tr|j|S|j|||S)aConvert 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. )rstrr,r )rrs rmakez IntEnum.makeJs5 eS !==' ' 5zrctr )NotImplementedErrorrs rrzIntEnum._maximum^s!!rc6|jjSr )__name__lowerr4s rrzIntEnum._short_namebs||!!##rcy)Nr4s rrzIntEnum._prefixfsrcyr r:)rr!s rr&zIntEnum._extra_from_textjsrc|Sr r:)rr current_texts rrzIntEnum._extra_to_textnsrctSr )rr4s rr*z IntEnum._unknown_exception_classrsrN)r6 __module__ __qualname__ classmethodrr rrr0r,r r.rr1rrrr&rr*r:rrrrs1QQ-tH~-S-X--& T(^ C C  $x.sCxX&""$$r)enumtypingrrrrrr:rrrDs.$ '' :Y /\dll\r