o
    L)j                     @  sT   d dl mZ d dlZd dlmZ G dd deZG dd deZG dd	 d	eZ	dS )
    )annotationsN)Mappingc                   @  s,   e Zd Zddd
dZdddZdddZdS )HTTPExceptionNstatus_codeintdetail
str | NoneheadersMapping[str, str] | NonereturnNonec                 C  s*   |d u r
t |j}|| _|| _|| _d S N)http
HTTPStatusphraser   r   r	   )selfr   r   r	    r   y/var/www/html/finance-dev.cargoinsureonline.com/_shared/backend-venv/lib/python3.10/site-packages/starlette/exceptions.py__init__   s
   
zHTTPException.__init__strc                 C     | j  d| j S Nz: )r   r   r   r   r   r   __str__      zHTTPException.__str__c                 C  "   | j j}| d| jd| jdS )Nz(status_code=z	, detail=))	__class____name__r   r   r   
class_namer   r   r   __repr__      zHTTPException.__repr__)NN)r   r   r   r   r	   r
   r   r   r   r   r   
__module____qualname__r   r   r!   r   r   r   r   r      s    
r   c                   @  s,   e Zd Zdddd	ZdddZdddZdS )WebSocketExceptionNcoder   reasonr   r   r   c                 C  s   || _ |pd| _d S )N r(   r)   )r   r(   r)   r   r   r   r      s   zWebSocketException.__init__r   c                 C  r   r   r+   r   r   r   r   r      r   zWebSocketException.__str__c                 C  r   )Nz(code=z	, reason=r   )r   r   r(   r)   r   r   r   r   r!      r"   zWebSocketException.__repr__r   )r(   r   r)   r   r   r   r#   r$   r   r   r   r   r'      s    
r'   c                   @  s   e Zd ZdZdS )StarletteDeprecationWarninga_  A custom deprecation warning for Starlette.

    Unlike the built-in DeprecationWarning, this inherits from UserWarning to ensure it is visible by default, helping
    users discover deprecated features without needing to enable warnings explicitly.

    Reference: https://sethmlarson.dev/deprecations-via-warnings-dont-work-for-python-libraries
    N)r   r%   r&   __doc__r   r   r   r   r,   $   s    r,   )

__future__r   r   collections.abcr   	Exceptionr   r'   UserWarningr,   r   r   r   r   <module>   s    