HEX
Server: LiteSpeed
System: Linux srv146.niagahoster.com 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
User: kodi1989 (1633)
PHP: 8.1.34
Disabled: symlink,shell_exec,exec,popen,system,dl,passthru,escapeshellarg,escapeshellcmd,show_source,pcntl_exec
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/dns/__pycache__/enum.cpython-37.pyc
B

��f��@sddlZGdd�dej�ZdS)�Nc@s�eZdZedd��Zedd��Zedd��Zedd��Zed	d
��Zedd��Z	ed
d��Z
edd��Zedd��Zedd��Z
dS)�IntEnumcCs6|��}|dks||kr2|��}t|�d|����dS)Nrz must be between >= 0 and <= )�_maximum�_short_name�
ValueError)�cls�value�max�name�r
�9/opt/alt/python37/lib/python3.7/site-packages/dns/enum.py�_check_valueszIntEnum._check_valuecCs�|��}y||Stk
r$YnX|�|�}|r8|S|��}|�|�r�|t|�d���r�t|t|�d��}|�|�y||�St	k
r�|SX|�
��dS)N)�upper�KeyError�_extra_from_text�_prefix�
startswith�len�isdigit�intrr�_unknown_exception_class)r�textr�prefixr
r
r�	from_texts"

zIntEnum.from_textcCsZ|�|�y||�j}Wntk
r0d}YnX|�||�}|dkrV|���|��}|S)N)rr	r�_extra_to_textr)rrrr
r
r�to_text1s

zIntEnum.to_textcCs@t|t�r|�|�S|�|�y||�Stk
r:|SXdS)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.
        N)�
isinstance�strrrr)rrr
r
r�make=s


zIntEnum.makecCst�dS)N)�NotImplementedError)rr
r
rrTszIntEnum._maximumcCs
|j��S)N)�__name__�lower)rr
r
rrXszIntEnum._short_namecCsdS)N�r
)rr
r
rr\szIntEnum._prefixcCsdS)Nr
)rrr
r
rr`szIntEnum._extra_from_textcCs|S)Nr
)rrZcurrent_textr
r
rrdszIntEnum._extra_to_textcCstS)N)r)rr
r
rrhsz IntEnum._unknown_exception_classN)r�
__module__�__qualname__�classmethodrrrrrrrrrrr
r
r
rrsr)�enumrr
r
r
r�<module>s