
    Mhk                    >    d Z ddlmZ ddlZddlmZ ddlmZ dd
ZdS )z
    getargspec excerpted from:

    sphinx.util.inspect
    ~~~~~~~~~~~~~~~~~~~
    Helpers for inspecting Python modules.
    :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    )annotationsN)partial)Anyfuncr   returninspect.FullArgSpecc           
        t          j        |           r| j        } t          |           t          u r?| j        }t          |          }t          |d                   }t          |d         pd          }t          |d                   }t          |d         pi           }| j	        r|t          | j	                  d         }| j        pdD ]k}	 |                    |          t          |          z
  }||= 	 ||= n# t          $ r Y nw xY wA# t          $ r |                    |          }||= ||= Y hw xY wt          j        ||d         |d         t!          |          |||d	                   S t#          | d
          r| j        } t#          | d
          t          j        |           st)          d| z            t          j        |           S )z?Like inspect.getargspec but supports functools.partial as well.r             N         __wrapped__z%r is not a Python function)inspectismethod__func__typer   r   
getargspeclistdictargslenkeywordsindex
IndexError
ValueErrorFullArgSpectuplehasattrr   
isfunction	TypeErrorgetfullargspec)	r   	orig_funcargspecr   defaultskwoargskwodefsargis	            Z/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/traitlets/utils/getargspec.pyr   r      s    }DzzWI	Y''GAJ
(b))wqz""wqz'R((9 	*DI(()D=&B 	! 	!C
!JJsOOc$ii/G !   D ! ! !MM#&&AJCLLL! "'!*gaj%//7GWUVZ
 
 	
 $
&
&   $
&
&  d## >5<===!$'''s6   (D9C=<D=
D
D	D

D%D65D6)r   r   r   r   )	__doc__
__future__r   r   	functoolsr   typingr   r   r       r,   <module>r2      sn     # " " " " "             
 (  (  (  (  (  (r1   