HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/compose/cli/__pycache__/verbose_proxy.cpython-310.pyc
o

S�`v�@sFddlZddlZddlZddlmZdd�Zdd�ZGdd�d�ZdS)	�N)�chaincCs6dd�|D�}dd�|��D�}d�d�t||���S)Ncss�|]}t|�VqdS�N)�repr)�.0�a�r�;/usr/lib/python3/dist-packages/compose/cli/verbose_proxy.py�	<genexpr>s�zformat_call.<locals>.<genexpr>css�|]}dj|�VqdS)z	{!s}={!r}N)�format)r�itemrrrr		s�z({})z, )�itemsr
�joinr)�args�kwargsrrr�format_callsrcCsht|tttf�rd�t|�jt|��S|r2t�	|��
d�}t|�|kr%dnd}d�|d|��|S|S)Nz({} with {} items)�
z
...�)�
isinstance�list�tuple�setr
�type�__name__�len�pprint�pformat�splitr
)�result�	max_lines�lines�extrarrr�
format_return
sr!c@s*eZdZdZd
dd�Zdd�Zdd	�ZdS)�VerboseProxyzrProxy all function calls to another class and log method name, arguments
    and return values for each call.
    N�
cCs&||_||_||_t�|pt�|_dSr)�obj_name�objr�logging�	getLoggerr�log)�selfr$r%�log_namerrrr�__init__szVerboseProxy.__init__cCs&t|j|�}t|�s|St�|j|�Sr)�getattrr%�callable�	functools�partial�proxy_callable)r)�name�attrrrr�__getattr__$szVerboseProxy.__getattr__cOsP|j�d|j|t||��t|j|�|i|��}|j�d|j|t||j��|S)Nz%s %s <- %sz%s %s -> %s)r(�infor$rr,r%r!r)r)�	call_namerrrrrrr0,s�
�zVerboseProxy.proxy_callable)Nr#)r�
__module__�__qualname__�__doc__r+r3r0rrrrr"s

r")r.r&r�	itertoolsrrr!r"rrrr�<module>s