o
    / h-  ã                   @  s>   d Z ddlmZ ddlZG dd„ dejƒZdd
d„ZdgZdS )z¸
h2/errors
~~~~~~~~~

Global error code registry containing the established HTTP/2 error codes.

The current registry is available at:
https://tools.ietf.org/html/rfc7540#section-11.4
é    )ÚannotationsNc                   @  sH   e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdS )Ú
ErrorCodeszD
    All known HTTP/2 error codes.

    .. versionadded:: 2.5.0
    r   é   é   é   é   é   é   é   é   é	   é
   é   é   é   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚNO_ERRORÚPROTOCOL_ERRORÚINTERNAL_ERRORÚFLOW_CONTROL_ERRORÚSETTINGS_TIMEOUTÚSTREAM_CLOSEDÚFRAME_SIZE_ERRORÚREFUSED_STREAMÚCANCELÚCOMPRESSION_ERRORÚCONNECT_ERRORÚENHANCE_YOUR_CALMÚINADEQUATE_SECURITYÚHTTP_1_1_REQUIRED© r#   r#   úB/var/www/html/govbot/env/lib/python3.10/site-packages/h2/errors.pyr      s     r   ÚcodeÚintÚreturnúErrorCodes | intc                 C  s"   zt | ƒW S  ty   |  Y S w )z»
    Given an integer error code, returns either one of :class:`ErrorCodes
    <h2.errors.ErrorCodes>` or, if not present in the known set of codes,
    returns the integer directly.
    )r   Ú
ValueError)r%   r#   r#   r$   Ú_error_code_from_intA   s
   
ÿr*   )r%   r&   r'   r(   )r   Ú
__future__r   ÚenumÚIntEnumr   r*   Ú__all__r#   r#   r#   r$   Ú<module>   s    	
2
