
    8Cf                    R    d dl mZ d dlmZ d dlmZ d dlmZ erd dlm	Z	 ddd
dZ
y	)    )annotations)suppress)import_module)TYPE_CHECKING)SanicF)failc                  | j                   j                  syd}t        t              5  t	        d      }ddd       |s|rt        d      yt        | dd      s&t        |d      } || fi || _        | j                  S y# 1 sw Y   MxY w)az  Setup Sanic Extensions.

    Requires Sanic Extensions to be installed.

    Args:
        app (Sanic): Sanic application.
        fail (bool, optional): Raise an error if Sanic Extensions is not
            installed. Defaults to `False`.
        **kwargs: Keyword arguments to pass to `sanic_ext.Extend`.

    Returns:
        sanic_ext.Extend: Sanic Extensions instance.
    N	sanic_extzSanic Extensions is not installed. You can add it to your environment using:
$ pip install sanic[ext]
or
$ pip install sanic-ext_extExtend)	configAUTO_EXTENDr   ModuleNotFoundErrorr   RuntimeErrorgetattrr   ext)appr   kwargsr
   Exts        U/var/www/highfloat_scraper/venv/lib/python3.12/site-packages/sanic/application/ext.py	setup_extr      s     ::!!I	%	& /!+.	/ $  	3%i*s%f%ww	 &/ /s   BB
N)r   r   r   bool)
__future__r   
contextlibr   	importlibr   typingr   sanicr   r        r   <module>r       s#    "  #    +0 $r   