
    i	                         d Z g dZddlZddlZddlZej
                  rddlZddlZddl	m
Z
  G d dej                        Z ej                  eej                        Z G d dej                         Zy)	a  This module implements the type extensions applied by SearXNG.

- :py:obj:`flask.request` is replaced by :py:obj:`sxng_request`
- :py:obj:`flask.Request` is replaced by :py:obj:`SXNG_Request`
- :py:obj:`httpx.response` is replaced by :py:obj:`SXNG_Response`

----

.. py:attribute:: sxng_request
   :type: SXNG_Request

   A replacement for :py:obj:`flask.request` with type cast :py:obj:`SXNG_Request`.

.. autoclass:: SXNG_Request
   :members:

.. autoclass:: SXNG_Response
   :members:

)SXNG_Requestsxng_requestSXNG_Response    N)OnlineParamTypesc                   v    e Zd ZU dZee   ed<   	 ded<   	 ee   ed<   	 eed<   	 eed<   	 ed   ed	<   	 eed
<   y)r   zSearXNG extends the class :py:obj:`flask.Request` with properties from
    *this* class definition, see type cast :py:obj:`sxng_request`.
    user_pluginszsearx.preferences.Preferencespreferenceserrors
start_timerender_timezsearx.results.Timingtimingsremote_addrN)__name__
__module____qualname____doc__liststr__annotations__float     %/root/searxng/searx/extended_types.pyr   r   $   se     s)A00)I
 J  ())D r   r   c                   &    e Zd ZU dZeed<   ded<   y)r   aV  SearXNG extends the class :py:obj:`httpx.Response` with properties from
    *this* class (type cast of :py:obj:`httpx.Response`).

    .. code:: python

       response = httpx.get("https://example.org")
       response = typing.cast(SXNG_Response, response)
       if response.ok:
          ...
       query_was = search_params["query"]
    okr   search_paramsN)r   r   r   r   boolr   r   r   r   r   r   H   s    
 	H%%r   r   )r   __all__typingflaskhttpxTYPE_CHECKINGsearx.preferencessearxsearx.resultssearx.search.processorsr   Requestr   castrequestr   Responser   r   r   r   <module>r+      se   , <   	85== B v{{<7&ENN &r   