
     h>                     (    d dl Z d dlZd Zd Zd ZdS )    Nc                     t          | dd          rdS t          | dd          rdS t          j        |           rdS t          | d          rt	          j        | j                  rdS t	          j        |            S )zY
    Tests to see if an application is a legacy-style (double-callable) application.
    _asgi_single_callableF_asgi_double_callableT__call__)getattrinspectisclasshasattrasyncioiscoroutinefunctionr   applications    Q/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/asgiref/compatibility.pyis_double_callabler      s    
 {3U;; u{3U;; t{## t{J''  &{';<< 	5*;7777    c                       fd}|S )zS
    Transforms a double-callable ASGI application into a single-callable one.
    c                 B   K    |           } |||           d {V S )N )scopereceivesendinstancer   s       r   new_applicationz2double_to_single_callable.<locals>.new_application    s:      ;u%%Xgt,,,,,,,,,r   r   )r   r   s   ` r   double_to_single_callabler      s$    
- - - - - r   c                 B    t          |           rt          |           } | S )z
    Takes either a single- or double-callable application and always returns it
    in single-callable style. Use this to add backwards compatibility for ASGI
    2.0 applications to your server/test harness/etc.
    )r   r   r   s    r   guarantee_single_callabler   '   s'     +&& =/<<r   )r   r   r   r   r   r   r   r   <module>r      sN     8 8 8,	 	 	    r   