Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/proto/marshal/rules/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/proto/marshal/rules/__pycache__/enums.cpython-38.pyc
U

O��g��@s.ddlmZddlZddlZGdd�d�ZdS)�)�TypeNc@s@eZdZdZeejd�dd�Zdd�ed�dd�Z	d	d
�Z
dS)�EnumRulez@A marshal for converting between integer values and enum values.)�
enum_classcCs
||_dS�N)�_enum)�selfr�r�F/opt/cppython/lib/python3.8/site-packages/proto/marshal/rules/enums.py�__init__szEnumRule.__init__N)�absentc	CsTt|t�rPt||j�sPz|�|�WStk
rNt�dj|jj|d��YnX|S)Nz'Unrecognized {name} enum value: {value})�name�value)�
isinstance�intr�
ValueError�warnings�warn�format�__name__)rr
rrrr	�	to_pythons��
zEnumRule.to_pythoncCs,t||j�r|jSt|t�r(|j|jS|Sr)rrr
�str)rr
rrr	�to_proto-s

zEnumRule.to_proto)r�
__module__�__qualname__�__doc__r�enum�IntEnumr
�boolrrrrrr	rsr)�typingrrrrrrrr	�<module>s

F1le Man4ger