
    ei              	          d dl Z d dlmZmZmZ d dlmZ d dlmZm	Z	 d dl
mZ d dlZ e j        ej                  Zdedee	         fdZ G d	 d
e	          ZdeddfdZdej        dede j        deej                 fdZdS )    N)CallableOptionalType)nodes)DynamicClassDefContextPlugin)dataclassesversionreturnc                     t           S )N)MarshmallowDataclassPlugin)r
   s    q/var/www/html/volatility/venv/lib/python3.11/site-packages/ccxt/static_dependencies/marshmallow_dataclass/mypy.pypluginr      s    %%    c                   H    e Zd Zdedeeegdf                  fdZdefdZdS )r   fullnamer   Nc                      |dk    rt           S d S )Nzmarshmallow_dataclass.NewType)new_type_hookselfr   s     r   get_dynamic_class_hookz1MarshmallowDataclassPlugin.get_dynamic_class_hook   s     666  tr   c                 *    |dk    rt           j        S d S )Nzmarshmallow_dataclass.dataclass)r	   dataclass_class_maker_callbackr   s     r   get_class_decorator_hookz3MarshmallowDataclassPlugin.get_class_decorator_hook   s    888==tr   )	__name__
__module____qualname__strr   r   r   r   r    r   r   r   r      sf        	(23T9:	;         r   r   ctxc                 4   t          | j        dt                    }t          |t          j                  sdS |j        }t          |t          j                  sdS | j        	                    | j
        t	          j        t          j        |                     dS )zs
    Dynamic class hook for :func:`marshmallow_dataclass.NewType`.

    Uses the type of the ``typ`` argument.
    typN)_get_arg_by_namecall_NEW_TYPE_SIG
isinstancer   RefExprnodeTypeInfoapiadd_symbol_table_nodenameSymbolTableNodeGDEF)r    r"   infos      r   r   r      s     38UM
:
:Cc5=)) 8DdEN++ G!!#(E,A%*d,S,STTTTTr   r$   r,   sigc                    g }i }t          | j        | j                  D ]"\  }}||                    |           |||<   #	  |j        |i |}n# t
          $ r Y dS w xY w	 |j        |         S # t          $ r Y dS w xY w)z
    Get value of argument from a call.

    :return: The argument value, or ``None`` if it cannot be found.

    .. warning::
        This probably doesn't yet work for calls with ``*args`` and/or ``*kwargs``.
    N)zip	arg_namesargsappendbind	TypeError	argumentsKeyError)r$   r,   r0   r4   kwargsarg_name	arg_value
bound_argss           r   r#   r#   .   s     DF"4>49== ) ))KK	""""(F8SXt.v..

   tt#D))   tts$   A 
AA#A0 0
A>=A>)inspecttypingr   r   r   mypyr   mypy.pluginr   r   mypy.pluginsr	   marshmallow_dataclass	signatureNewTyper%   r   r   r   r   CallExpr	Signature
Expressionr#   r   r   r   <module>rI      sN    + + + + + + + + + +       6 6 6 6 6 6 6 6 $ $ $ $ $ $    !!"7"?@@&C &DL & & & &       U- U$ U U U U
. #*1*;e     r   