o
    2h	                     @   sB  d Z ddlmZmZmZmZmZmZmZ z
ddl	m
Z
mZ W n ey.   ddl	mZ Y dS w dddddi edd dd d	d d
d dd fdee dee dee deeedf  deee  deeeef  deeef deegef deegef deegef deegef deegef deegef defddZdS )ae  The inspect.formatargspec() function was dropped in Python 3.11 but we need
it for when constructing signature changing decorators based on result of
inspect.getfullargspec(). The code here implements inspect.formatargspec() based
on Parameter and Signature from inspect module, which were added in Python 3.6.
Thanks to Cyril Jouve for the implementation.
    )AnyCallableListMappingOptionalSequenceTuple)	Parameter	Signature)formatargspecNc                 C      d|  S )N* namer   r   J/var/www/html/chatgem/venv/lib/python3.10/site-packages/wrapt/arguments.py<lambda>       r   c                 C   r   )Nz**r   r   r   r   r   r      r   c                 C      dt |  S )N=repr)valuer   r   r   r          c                 C   r   Nz -> r   )textr   r   r   r      r   c                 C   r   r   r   )annotr   r   r   r      r   argsvarargsvarkwdefaults.
kwonlyargskwonlydefaultsannotations	formatargformatvarargsformatvarkwformatvalueformatreturnsformatannotationreturnc                    s   |d u rd}d u ri rt nd} fddt| |t |  D }|r0|t|tj | fdd|D  |rH|t|tj  dtj	}t
t||dS )	Nr   r   c              
      sB   g | ]\}}t |t jr|d kr| nt j |t jdqS )r   default
annotation)r	   POSITIONAL_OR_KEYWORDemptyget).0iarg)r#   r    r   r   
<listcomp>$   s    z!formatargspec.<locals>.<listcomp>c              	   3   s6    | ]}t |t j|t j |t jd V  qdS )r+   N)r	   KEYWORD_ONLYr0   r/   )r1   	kwonlyarg)r#   r"   r   r   	<genexpr>/   s    
z formatargspec.<locals>.<genexpr>r*   )return_annotation)len	enumerateappendr	   VAR_POSITIONALextendVAR_KEYWORDr0   r
   r/   str)r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   	ndefaults
parametersr8   r   )r#   r    r"   r   r      s"   		r   )__doc__typingr   r   r   r   r   r   r   inspectr	   r
   ImportErrorr   r?   r   r   r   r   <module>   s`    $

	
