HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/asgiref/__pycache__/compatibility.cpython-310.pyc
o

�hF�@s0ddlZddlmZdd�Zdd�Zdd	�ZdS)
�N�)�iscoroutinefunctioncCsPt|dd�rdSt|dd�rdSt�|�rdSt|d�r#t|j�r#dSt|�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�hasattrrr��application�r
�H/usr/local/CyberCP/lib/python3.10/site-packages/asgiref/compatibility.py�is_double_callables



rcs�fdd�}|S)zS
    Transforms a double-callable ASGI application into a single-callable one.
    c�s��|�}|||�IdHS)Nr
)�scope�receive�send�instancerr
r�new_application!s�z2double_to_single_callable.<locals>.new_applicationr
)rrr
rr�double_to_single_callablesrcCst|�rt|�}|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.
    )rrrr
r
r�guarantee_single_callable(sr)r�syncrrrrr
r
r
r�<module>s