Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/inspect.cpython-37.opt-2.pyc

B

YI~d���@s�dZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlmZddlmZmZe�Zx"ej��D]\ZZeede<q�WdZdd�Zd	d
�Zdd�Z d
d�Z!dd�Z"e#ed��rdd�Z$ndd�Z$e#ed��r*dd�Z%ndd�Z%dd�Z&dd�Z'dd�Z(dd �Z)d!d"�Z*d#d$�Z+d%d&�Z,d'd(�Z-d)d*�Z.d+d,�Z/d-d.�Z0d/d0�Z1d1d2�Z2d3d4�Z3d�d5d6�Z4ed7d8�Z5d9d:�Z6d;d<�Z7dd=�d>d?�Z8d@dA�Z9dBdC�Z:dDdE�Z;dFdG�Z<dHdI�Z=dJdK�Z>dLdM�Z?dNdO�Z@d�dPdQ�ZAiZBiZCd�dRdS�ZDdTdU�ZEdVdW�ZFGdXdY�dYeG�ZHGdZd[�d[�ZId\d]�ZJd^d_�ZKd`da�ZLdbdc�ZMd�dedf�ZNedgdh�ZOdidj�ZPdkdl�ZQedmdn�ZRdodp�ZSedqdr�ZTdsdt�ZUedudv�ZVdwdx�ZWd�dydz�ZXd{d|�ZYdddd}iieZd~d�d�d�d�d�d�d�eXfd�d��Z[eZd�d�d�d�d�d�fd�d��Z\d�d��Z]d�d��Z^d�d��Z_ed�d��Z`d�d��Zaed�d��Zbd�d�d��Zcd�d��Zded�d�ebje�Zfd�d�d��Zgd�d�d��Zhd�d��Zid�d�d��Zjd�d�d��Zkel�Zmd�d��Znd�d��Zod�d��Zpd�d��Zqd�d��Zremfd�d��Zsd�Ztd�Zud�Zvd�Zwd�d��Zxd�d��Zyd�Zzd�Z{d�Z|d�Z}d�d��Z~d�d„Ze�e�j��Z�e�e�j��Z�e�e�j�d��Z�e�e�e�ej�fZ�d�dńZ�d�d�dDŽZ�d�dɄZ�d�d˄Z�d�d̈́Z�d�dτZ�d�dфZ�d�d�dԄZ�d�d�dքZ�d�d؄Z�d�d�dٜd�dۄZ�Gd�d݄d݃Z�Gd�d߄d߃Z�Gd�d�d�ej��Z�e�j�Z�e�j�Z�e�j�Z�e�j�Z�e�j�Z�e�d�e�d�e�d�e�d�e�d�iZ�e�j�Z�Gd�d�d�Z�Gd�d�d�Z�Gd�d�d�Z�d�d�d�d�Z�d�d�Z�e�d�k�r�e��dS()zKa-Ping Yee <ping@lfw.org>z'Yury Selivanov <yselivanov@sprymix.com>�N)�
attrgetter)�
namedtuple�OrderedDictZCO_icCst|tj�S)N)�
isinstance�types�
ModuleType)�object�r	�,/opt/alt/python37/lib64/python3.7/inspect.py�ismodule?srcCs
t|t�S)N)r�type)rr	r	r
�isclassHsr
cCst|tj�S)N)rr�
MethodType)rr	r	r
�ismethodPsrcCs:t|�st|�st|�rdSt|�}t|d�o8t|d�S)NF�__get__�__set__)r
r�
isfunctionr�hasattr)r�tpr	r	r
�ismethoddescriptorZsrcCs8t|�st|�st|�rdSt|�}t|d�o6t|d�S)NFrr)r
rrrr)rrr	r	r
�isdatadescriptornsr�MemberDescriptorTypecCst|tj�S)N)rrr)rr	r	r
�ismemberdescriptor~srcCsdS)NFr	)rr	r	r
r�s�GetSetDescriptorTypecCst|tj�S)N)rrr)rr	r	r
�isgetsetdescriptor�srcCsdS)NFr	)rr	r	r
r�scCst|tj�S)N)rr�FunctionType)rr	r	r
r�srcCs tt|�st|�o|jjt@�S)N)�boolrr�__code__�co_flagsZCO_GENERATOR)rr	r	r
�isgeneratorfunction�srcCs tt|�st|�o|jjt@�S)N)rrrrrZCO_COROUTINE)rr	r	r
�iscoroutinefunction�sr cCs tt|�st|�o|jjt@�S)N)rrrrrZCO_ASYNC_GENERATOR)rr	r	r
�isasyncgenfunction�sr!cCst|tj�S)N)rr�AsyncGeneratorType)rr	r	r
�
isasyncgen�sr#cCst|tj�S)N)rr�
GeneratorType)rr	r	r
�isgenerator�sr%cCst|tj�S)N)rr�
CoroutineType)rr	r	r
�iscoroutine�sr'cCs6t|tj�p4t|tj�r(t|jjt@�p4t|tj	j
�S)N)rrr&r$r�gi_coderZCO_ITERABLE_COROUTINE�collections�abc�	Awaitable)rr	r	r
�isawaitable�sr,cCst|tj�S)N)rr�
TracebackType)rr	r	r
�istraceback�sr.cCst|tj�S)N)rr�	FrameType)rr	r	r
�isframe�sr0cCst|tj�S)N)rr�CodeType)rr	r	r
�iscode�sr2cCst|tj�S)N)rr�BuiltinFunctionType)rr	r	r
�	isbuiltinsr4cCs t|�pt|�pt|�pt|�S)N)r4rrr)rr	r	r
�	isroutinesr5cCs�t|t�sdS|jt@rdStt|�tj�s0dSt|d�r>dSx&|j�	�D]\}}t
|dd�rJdSqJWx@|jD]6}x0t
|dd�D] }t
||d�}t
|dd�r�dSq�WqnWdS)NFT�__abstractmethods__�__isabstractmethod__r	)rr�	__flags__�TPFLAGS_IS_ABSTRACT�
issubclassr*�ABCMetar�__dict__�items�getattr�	__bases__)r�name�value�baser	r	r
�
isabstract$s"


rCc	Cs$t|�r|ft|�}nd}g}t�}t|�}yBx<|jD]2}x,|j��D]\}}t|tj	�rH|�
|�qHWq8WWntk
r�YnXx�|D]�}	yt||	�}
|	|kr�t�Wn:tk
r�x$|D]}|	|jkr�|j|	}
Pq�Ww�YnX|r�||
��r|�
|	|
f�|�
|	�q�W|jdd�d�|S)Nr	cSs|dS)Nrr	)Zpairr	r	r
�<lambda>e�zgetmembers.<locals>.<lambda>)�key)r
�getmro�set�dirr?r<r=rr�DynamicClassAttribute�append�AttributeErrorr>�add�sort)rZ	predicate�mro�results�	processed�namesrB�k�vrFrAr	r	r
�
getmembers<s:




rU�	Attributezname kind defining_class objectcCsht|�}tt|��}tdd�|D��}|f|}||}t|�}x:|D]2}x,|j��D]\}}t|tj�rV|�	|�qVWqFWg}	t
�}
�x�|D�]�}d}d}
d}||
k�r�y|dkr�td��t||�}
Wn"tk
r�}zWdd}~XYn�Xt|
d|�}||k�r�d}d}x(|D] }t||d�}||
k�r|}�qWxH|D]@}y|�
||�}Wntk
�rh�w:YnX||
k�r:|}�q:W|dk	�r�|}x4|D],}||jk�r�|j|}||k�r�|}P�q�W|dk�r�q�|
dk	�r�|
n|}t|ttjf��r�d}|}nFt|ttjf��rd}|}n*t|t��r.d}|}nt|��r>d	}nd
}|	�	t||||��|
�|�q�W|	S)Ncss|]}|ttfkr|VqdS)N)rr)�.0�clsr	r	r
�	<genexpr>�sz'classify_class_attrs.<locals>.<genexpr>r<z)__dict__ is special, don't want the proxy�__objclass__z
static methodzclass method�property�method�data)rGr�tuplerIr<r=rrrJrKrH�	Exceptionr>�__getattr__rL�staticmethod�BuiltinMethodType�classmethod�ClassMethodDescriptorTyper[r5rVrM)rXrOZmetamroZclass_basesZ	all_basesrRrBrSrT�resultrQr@ZhomeclsZget_objZdict_obj�excZlast_clsZsrch_clsZsrch_obj�obj�kindr	r	r
�classify_class_attrsjs�

















ricCs|jS)N)�__mro__)rXr	r	r
rG�srG)�stopcs��dkrdd�}n�fdd�}|}t|�|i}t��}xD||�rz|j}t|�}||ksbt|�|krptd�|���|||<q8W|S)NcSs
t|d�S)N�__wrapped__)r)�fr	r	r
�_is_wrapper�szunwrap.<locals>._is_wrappercst|d�o�|�S)Nrl)r)rm)rkr	r
rn�sz!wrapper loop when unwrapping {!r})�id�sys�getrecursionlimitrl�len�
ValueError�format)�funcrkrnrmZmemoZrecursion_limitZid_funcr	)rkr
�unwrap�s

rvcCs|��}t|�t|���S)N)�
expandtabsrr�lstrip)�lineZexpliner	r	r
�
indentsizesrzcCsRtj�|j�}|dkrdSx&|j�d�dd�D]}t||�}q0Wt|�sNdS|S)N�.���)rp�modules�get�
__module__�__qualname__�splitr>r
)rurXr@r	r	r
�
_findclass
sr�c	Cs�t|�rRxD|jD]:}|tk	ry
|j}Wntk
r<wYnX|dk	r|SqWdSt|�r�|jj}|j}t|�r�t	t	||d�d�|jkr�|}n|j
}n�t|�r�|j}t|�}|dks�t	||�|k	r�dSn�t
|��r|j}|j}t|��r|jd||jk�r|}n|j
}nzt|t��rL|j}|j}t|�}|dk�sFt	||�|k	�r�dSn:t|��s`t|��r�|j}|j}t	||�|k	�r�dSndSxJ|jD]@}yt	||�j}Wntk
�r��w�YnX|dk	�r�|S�q�WdS)N�__func__r{)r
rjr�__doc__rLrr��__name__�__self__r>�	__class__rr�r4r�rr[�fgetrrrZ)rgrB�docr@�selfrXrur	r	r
�_finddocsb





r�c	Csdy
|j}Wntk
rdSX|dkrNyt|�}Wnttfk
rLdSXt|t�s\dSt|�S)N)r�rLr��	TypeErrorr�str�cleandoc)rr�r	r	r
�getdocRs

r�cCs�y|���d�}Wntk
r&dSXtj}x:|dd�D]*}t|���}|r<t|�|}t||�}q<W|r~|d��|d<|tjkr�x*tdt|��D]}|||d�||<q�Wx|r�|ds�|�	�q�Wx|r�|ds�|�	d�q�Wd�
|�SdS)N�
�rr|)rwr��UnicodeErrorrp�maxsizerrrx�min�range�pop�join)r��linesZmarginryZcontent�indent�ir	r	r
r�es(
r�cCs�t|�r(t|dd�r|jStd�|���t|�rht|d�rZtj�	|j
�}t|dd�rZ|jStd�|���t|�rv|j}t
|�r�|j}t|�r�|j}t|�r�|j}t|�r�|jStd�t|�j���dS)N�__file__z{!r} is a built-in modulerz{!r} is a built-in classzVmodule, class, method, function, traceback, frame, or code object was expected, got {})rr>r�r�rtr
rrpr}r~rrr�rrr.�tb_framer0�f_coder2�co_filenamerr�)r�moduler	r	r
�getfile�s,
r�cCsTtj�|�}dd�tj��D�}|��x&|D]\}}|�|�r.|d|�Sq.WdS)NcSsg|]}t|�|f�qSr	)rr)rW�suffixr	r	r
�
<listcomp>�sz!getmodulename.<locals>.<listcomp>)�os�path�basename�	importlib�	machinery�all_suffixesrN�endswith)r�Zfname�suffixesZneglenr�r	r	r
�
getmodulename�s
r�cs�t|��tjjdd�}|tjjdd�7}t�fdd�|D��r`tj���dtjj	d�nt�fdd�tjj
D��r~dStj���r��Stt
|��dd�dk	r��S�tjkr��SdS)Nc3s|]}��|�VqdS)N)r�)rW�s)�filenamer	r
rY�sz getsourcefile.<locals>.<genexpr>rc3s|]}��|�VqdS)N)r�)rWr�)r�r	r
rY�s�
__loader__)r�r�r��DEBUG_BYTECODE_SUFFIXES�OPTIMIZED_BYTECODE_SUFFIXES�anyr�r��splitext�SOURCE_SUFFIXES�EXTENSION_SUFFIXES�existsr>�	getmodule�	linecache�cache)rZall_bytecode_suffixesr	)r�r
�
getsourcefile�s
r�cCs,|dkrt|�pt|�}tj�tj�|��S)N)r�r�r�r��normcase�abspath)r�	_filenamer	r	r
�
getabsfile�sr�c
Cs�t|�r|St|d�r$tj�|j�S|dk	rD|tkrDtj�t|�Syt||�}Wntk
rfdSX|tkr�tj�t|�Sxntj�	��
�D]\\}}t|�r�t|d�r�|j}|t�|d�kr�q�|t|<t|�}|j
t|<ttj�|�<q�W|tk�r
tj�t|�Stjd}t|d��s$dSt||j
��rLt||j
�}||k�rL|Stjd}t||j
��r~t||j
�}	|	|k�r~|SdS)Nrr��__main__r��builtins)rrrpr}r~r�
modulesbyfiler�r��copyr=r��_filesbymodnamer�r�r��realpathr>)
rr��file�modnamer�rm�mainZ
mainobjectZbuiltinZ
builtinobjectr	r	r
r��sD





r�c
Cs�t|�}|rt�|�n$t|�}|�d�r4|�d�s<td��t||�}|rZt�||j	�}n
t�|�}|sptd��t
|�r�|dfSt|��r |j}t
�d|d�}g}xRtt|��D]B}|�||�}|r�||ddkr�||fS|�|�d	�|f�q�W|�r|��||dd	fStd
��t|��r0|j}t|��r@|j}t|��rP|j}t|��r`|j}t|��r�t|d��s~td��|jd	}	t
�d
�}x*|	dk�r�|�||	��r�P|	d	}	�q�W||	fStd��dS)N�<�>zsource code not availablezcould not get source coderz^(\s*)class\s*z\b�cr�zcould not find class definition�co_firstlinenoz"could not find function definitionz>^(\s*def\s)|(\s*async\s+def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)zcould not find code object) r�r��
checkcacher��
startswithr��OSErrorr��getlinesr<rr
r��re�compiler�rr�matchrK�grouprNrr�rrr.r�r0r�r2rr�)
rr�r�r�r@ZpatZ
candidatesr�r��lnumr	r	r
�
findsource�s^









r�c	Cs>yt|�\}}Wnttfk
r(dSXt|�r�d}|rR|ddd�dkrRd}x(|t|�krz||��dkrz|d}qTW|t|�kr�||dd�dkr�g}|}x>|t|�kr�||dd�dkr�|�||���|d}q�Wd�|�S�nH|dk�r:t	||�}|d}|dk�r:||�
�dd�dk�r:t	||�|k�r:||���
�g}|dk�r�|d}||���
�}x\|dd�dk�r�t	||�|k�r�|g|dd�<|d}|dk�r�P||���
�}�q|Wx*|�r|d��dk�rg|dd�<�q�Wx*|�r.|d��dk�r.g|dd�<�qWd�|�SdS)	Nr�z#!r�)��#r�r�r|)r�r�r�rrr�striprKrwr�rzrx)rr�r��startZcomments�endr��commentr	r	r
�getcommentsAsJ "
$
&
r�c@seZdZdS)�
EndOfBlockN)r�rr�r	r	r	r
r�nsr�c@seZdZdd�Zdd�ZdS)�BlockFindercCs.d|_d|_d|_d|_d|_d|_d|_dS)NrFr�)r��islambda�started�passline�indecorator�decoratorhasargs�last)r�r	r	r
�__init__rszBlockFinder.__init__cCs|js@|js@|dkrd|_n|dkr8|dkr2d|_d|_d|_n�|dkrV|jrTd|_n�|dkrr|jrpd|_d|_n�|tjkr�d|_|d|_|jr�t�|jr�|js�d|_nn|jr�nf|tj	kr�|j
d	|_
d|_nH|tjkr�|j
d	|_
|j
dkr�t�n"|j
dk�r|tjtj
fk�rt�dS)
N�@T)�def�class�lambdar��(�)Frr�)r�r�r�r�r��tokenize�NEWLINEr�r��INDENTr��DEDENT�COMMENT�NL)r�r�tokenZsrowcolZerowcolryr	r	r
�
tokeneater{sB




zBlockFinder.tokeneaterN)r�rr�r�r�r	r	r	r
r�ps	r�c	CsZt�}y,t�t|�j�}x|D]}|j|�qWWnttfk
rJYnX|d|j�S)N)	r�r��generate_tokens�iter�__next__r�r��IndentationErrorr�)r�Zblockfinder�tokensZ_tokenr	r	r
�getblock�s
r�cCsbt|�}t|�\}}t|�r"|j}t|�s>t|�rF|jjdkrF|dfSt||d��|dfSdS)Nz<module>rr�)	rvr�r.r�rr0r��co_namer�)rr�r�r	r	r
�getsourcelines�sr�cCst|�\}}d�|�S)Nr�)r�r�)rr�r�r	r	r
�	getsource�sr�cCsVg}|jtdd�d�x:|D]2}|�||jf�||kr|�t||||��qW|S)Nrr�)rF)rNrrKr?�walktree)�classes�children�parentrPr�r	r	r
r��s
r�FcCs�i}g}xn|D]f}|jrbxZ|jD]<}||kr4g||<|||krN||�|�|r ||kr Pq Wq||kr|�|�qWx|D]}||kr~|�|�q~Wt||d�S)N)r?rKr�)r��uniquer��rootsr�rr	r	r
�getclasstree�s"	

r�	Argumentszargs, varargs, varkwcCs t|�\}}}}t||||�S)N)�_getfullargsr)�co�args�varargs�
kwonlyargs�varkwr	r	r
�getargs�src	Cs�t|�std�|���|j}|j}|j}t|d|��}t||||��}d}||7}d}|jt@rx|j|}|d}d}|jt	@r�|j|}||||fS)Nz{!r} is not a code objectrr�)
r2r�rt�co_argcount�co_varnames�co_kwonlyargcount�listr�
CO_VARARGS�CO_VARKEYWORDS)	r�nargsrRZnkwargsrr	�steprr
r	r	r
rs"



r�ArgSpeczargs varargs keywords defaultscCsDtjdtdd�t|�\}}}}}}}|s.|r6td��t||||�S)Nzhinspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()r�)�
stacklevelzdFunction has keyword-only parameters or annotations, use getfullargspec() API which can support them)�warnings�warn�DeprecationWarning�getfullargspecrsr)rurrr
�defaultsr	�kwonlydefaults�annr	r	r
�
getargspec s
r�FullArgSpeczGargs, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotationsc

Cs`yt|ddtd�}Wn,tk
r@}ztd�|�Wdd}~XYnXg}d}d}g}d}i}d}i}	|j|jk	rx|j|d<x�|j��D]�}
|
j}|
j	}|t
kr�|�|�nv|tkr�|�|�|
j
|
jk	r�||
j
f7}nJ|tkr�|}n<|tk�r|�|�|
j
|
jk	�r|
j
|	|<n|tk�r|}|
j|
jk	r�|
j||<q�W|	�sBd}	|�sLd}t||||||	|�S)NF)�follow_wrapper_chains�skip_bound_arg�sigclszunsupported callabler	�return)�_signature_from_callable�	Signaturer_r��return_annotation�empty�
parameters�valuesrhr@�_POSITIONAL_ONLYrK�_POSITIONAL_OR_KEYWORD�default�_VAR_POSITIONAL�
_KEYWORD_ONLY�_VAR_KEYWORD�
annotationr)
ru�sig�exrrr
r	r�annotations�
kwdefaults�paramrhr@r	r	r
rAsT





r�ArgInfozargs varargs keywords localscCs t|j�\}}}t||||j�S)N)rr�r5�f_locals)�framerrr
r	r	r
�getargvalues�sr8cCsVt|dd�dkr t|��dd�St|t�rN|jd|fkr>|jS|jd|jSt|�S)Nr�typingztyping.r�r�r{)r>�repr�replacerrrr�)r/Zbase_moduler	r	r
�formatannotation�s
r<cst|dd���fdd�}|S)Nrcs
t|��S)N)r<)r/)r�r	r
�_formatannotation�sz5formatannotationrelativeto.<locals>._formatannotation)r>)rr=r	)r�r
�formatannotationrelativeto�sr>r	cCsd|S)N�*r	)r@r	r	r
rD�rErDcCsd|S)Nz**r	)r@r	r	r
rD�rEcCsdt|�S)N�=)r:)rAr	r	r
rD�rEcCsd|S)Nz -> r	)�textr	r	r
rD�rEc
sDddlm}
|
dtdd����fdd�}g}|rBt|�t|�}xFt|�D]:\}}||�}|r|||kr|||
|||�}|�|�qLW|dk	r�|�|||���n|r�|�d�|r�x:|D]2}||�}|r�||kr�||
||�7}|�|�q�W|dk	�r|�|	||���d	d
�|�d}d�k�r@||��d��7}|S)
Nr)rzc`formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directlyr�)rcs(�|�}|�kr$|d��|�7}|S)Nz: r	)�argre)r2r<�	formatargr	r
�formatargandannotation�sz-formatargspec.<locals>.formatargandannotationr?r�z, r�r")rrrrr�	enumeraterKr�)rrr
rr	rr2rC�
formatvarargs�formatvarkw�formatvalueZ
formatreturnsr<rrD�specsZfirstdefaultr�rB�specZ	kwonlyargrer	)r2r<rCr
�
formatargspec�s:



rKcCsd|S)Nr?r	)r@r	r	r
rD�rEcCsd|S)Nz**r	)r@r	r	r
rD�rEcCsdt|�S)Nr@)r:)rAr	r	r
rD�rEcCs�|||fdd�}g}	x&tt|��D]}
|	�|||
��q"W|rZ|	�||�|||��|rx|	�||�|||��dd�|	�dS)NcSs||�|||�S)Nr	)r@�localsrCrHr	r	r
�convert�sz formatargvalues.<locals>.convertr�z, r�)r�rrrKr�)rrr
rLrCrFrGrHrMrIr�r	r	r
�formatargvalues�srNcs��fdd�|D�}t|�}|dkr,|d}n>|dkr@dj|�}n*dj|dd��}|dd�=d	�|�|}td
|||rzdnd|dkr�d
nd|f��dS)Ncsg|]}|�krt|��qSr	)r:)rWr@)r(r	r
r�	sz&_missing_arguments.<locals>.<listcomp>r�rr�z	{} and {}z, {} and {}���z, z*%s() missing %i required %s argument%s: %s�
positionalzkeyword-onlyr�r�)rrrtr�r�)�f_nameZargnames�posr(rR�missingr��tailr	)r(r
�_missing_argumentss


rUc
	s�t|�|}t�fdd�|D��}|r:|dk}	d|f}
n2|rTd}	d|t|�f}
nt|�dk}	tt|��}
d}|r�d}||dkr�d	nd||dkr�d	ndf}td
||
|	r�d	nd|||dkr�|s�dndf��dS)
Ncsg|]}|�kr|�qSr	r	)rWrB)r(r	r
r�sz_too_many.<locals>.<listcomp>r�zat least %dTz
from %d to %dr�z7 positional argument%s (and %d keyword-only argument%s)r�z5%s() takes %s positional argument%s but %d%s %s givenZwasZwere)rrr�r�)
rQrZkwonlyrZdefcountZgivenr(ZatleastZkwonly_given�pluralr0Z
kwonly_sig�msgr	)r(r
�	_too_manys$rXcOs4|d}|dd�}t|�}|\}}}}}	}
}|j}i}
t|�rV|jdk	rV|jf|}t|�}t|�}|rrt|�nd}t||�}x t|�D]}|||
||<q�W|r�t||d��|
|<t||	�}|r�i|
|<xd|�	�D]X\}}||k�r|�st
d||f��||
||<q�||
k�r,t
d||f��||
|<q�W||k�r\|�s\t|||	||||
�||k�r�|d||�}x&|D]}||
k�r|t||d|
��q|Wx8t
|||d��D] \}}||
k�r�|||
|<�q�Wd}x>|	D]6}||
k�r�|
�r||
k�r|
||
|<n|d7}�q�W|�r0t||	d|
�|
S)Nrr�z*%s() got an unexpected keyword argument %rz(%s() got multiple values for argument %rTF)rr�rr�rrr�r�r^rHr=r�rXrUrE)Zfunc_and_positionalZnamedrurPrJrrr
rr	rrrQZ	arg2valueZnum_posZnum_argsZnum_defaults�nr�Zpossible_kwargs�kwrAZreqrBrS�kwargr	r	r
�getcallargs-sd








r\�ClosureVarsz"nonlocals globals builtins unboundc	Cst|�r|j}t|�s$td�|���|j}|jdkr:i}ndd�t|j|j�D�}|j	}|�
dtj�}t
|�rt|j}i}i}t�}xn|jD]d}|dkr�q�y||||<Wq�tk
r�y||||<Wntk
r�|�|�YnXYq�Xq�Wt||||�S)Nz{!r} is not a Python functioncSsi|]\}}|j|�qSr	)�
cell_contents)rW�varZcellr	r	r
�
<dictcomp>�sz"getclosurevars.<locals>.<dictcomp>�__builtins__)�None�True�False)rr�rr�rtr�__closure__�zip�co_freevars�__globals__r~r�r<rrH�co_names�KeyErrorrMr])	ru�codeZ
nonlocal_varsZ	global_nsZ
builtin_nsZglobal_varsZbuiltin_varsZ
unbound_namesr@r	r	r
�getclosurevarsms8	
rl�	Tracebackz+filename lineno function code_context indexr�cCs�t|�r|j}|j}n|j}t|�s2td�|���t|�p@t|�}|dkr�|d|d}yt	|�\}}Wnt
k
r�d}}Yq�Xtdt|t
|�|��}||||�}|d|}nd}}t|||jj||�S)Nz'{!r} is not a frame or traceback objectrr�r�)r.�	tb_linenor��f_linenor0r�rtr�r�r�r��maxr�rrrmr�r�)r7�context�linenor�r�r�r��indexr	r	r
�getframeinfo�s$rtcCs|jS)N)ro)r7r	r	r
�	getlineno�sru�	FrameInfo)r7cCs6g}x,|r0|ft||�}|�t|��|j}qW|S)N)rtrKrv�f_back)r7rq�	framelist�	frameinfor	r	r
�getouterframes�s
rzcCs8g}x.|r2|jft||�}|�t|��|j}qW|S)N)r�rtrKrv�tb_next)�tbrqrxryr	r	r
�getinnerframes�s
r}cCsttd�rt�d�SdS)N�	_getframer�)rrpr~r	r	r	r
�currentframe�srcCstt�d�|�S)Nr�)rzrpr~)rqr	r	r
�stack�sr�cCstt��d|�S)Nr�)r}rp�exc_info)rqr	r	r
�trace�sr�cCstjd�|�S)Nrj)rr<r)�klassr	r	r
�_static_getmro�sr�cCs8i}yt�|d�}Wntk
r(YnXt�||t�S)Nr<)r�__getattribute__rL�dictr~�	_sentinel)rg�attrZ
instance_dictr	r	r
�_check_instance�sr�c	CsFx@t|�D]4}tt|��tkr
y
|j|Stk
r<Yq
Xq
WtS)N)r��_shadowed_dictrr�r<rj)r�r��entryr	r	r
�_check_classs

r�cCs&yt|�Wntk
r dSXdS)NFT)r�r�)rgr	r	r
�_is_type	s
r�c	Csntjd}x^t|�D]R}y|�|�d}Wntk
r>YqXt|�tjkrb|jdkrb|j|ks|SqWt	S)Nr<)
rr<r�rrjrrr�rZr�)r��	dict_attrr�Z
class_dictr	r	r
r�s


r�c	Cst}t|�s>t|�}t|�}|tks2t|�tjkrBt||�}n|}t||�}|tk	r�|tk	r�tt|�d�tk	r�tt|�d�tk	r�|S|tk	r�|S|tk	r�|S||kr�xDtt|��D]4}tt|��tkr�y
|j	|St
k
r�Yq�Xq�W|tk	r�|St|��dS)Nrr)r�r�rr�rrr�r�r�r<rjrL)rgr�r+Zinstance_resultr�r�Zklass_resultr�r	r	r
�getattr_statics6


r��GEN_CREATED�GEN_RUNNING�
GEN_SUSPENDED�
GEN_CLOSEDcCs,|jr
tS|jdkrtS|jjdkr(tStS)Nr|)�
gi_runningr��gi_framer��f_lastir�r�)�	generatorr	r	r
�getgeneratorstateSs	
r�cCs:t|�std�|���t|dd�}|dk	r2|jjSiSdS)Nz{!r} is not a Python generatorr�)r%r�rtr>r�r6)r�r7r	r	r
�getgeneratorlocalsesr��CORO_CREATED�CORO_RUNNING�CORO_SUSPENDED�CORO_CLOSEDcCs,|jr
tS|jdkrtS|jjdkr(tStS)Nr|)�
cr_runningr��cr_framer�r�r�r�)�	coroutiner	r	r
�getcoroutinestate}s	
r�cCs"t|dd�}|dk	r|jSiSdS)Nr�)r>r6)r�r7r	r	r
�getcoroutinelocals�sr��
from_bytescCs6yt||�}Wntk
r"dSXt|t�s2|SdS)N)r>rLr�_NonUserDefinedCallables)rXZmethod_nameZmethr	r	r
�"_signature_get_user_defined_method�s
r�c
Cs�|j}t|���}|jpd}|jp$i}|r2||}y|j||�}Wn6tk
rx}zd�|�}	t|	�|�Wdd}~XYnXd}
�x
|��D�]�\}}y|j	|}
Wnt
k
r�YnlX|jtkr�|�
|�q�|jtk�r||kr�d}
|j|
d�||<n|�
|j�q�|jtk�r"|j|
d�||<|
r�|jtk�rV||jtd�}|||<|�|�q�|jttfk�rr|�|�q�|jtkr�|�
|j�q�W|j|��d�S)Nr	z+partial object {!r} has incorrect argumentsFT)r+)rh)r')r'rr=r�keywords�bind_partialr�rtrs�	argumentsrjrhr)r�r*r;r@r-�move_to_endr.r,r()�wrapped_sig�partialZ
extra_argsZ
old_params�
new_paramsZpartial_argsZpartial_keywordsZbar1rWZtransform_to_kwonly�
param_namer4Z	arg_valueZ	new_paramr	r	r
�_signature_get_partial�sL






r�cCslt|j���}|r$|djttfkr,td��|dj}|ttfkrP|dd�}n|t	k	r`td��|j
|d�S)Nrzinvalid method signaturer�zinvalid argument type)r')r^r'r(rhr.r-rsr*r)r,r;)r0�paramsrhr	r	r
�_signature_bound_methods
r�cCs&t|�p$t|�p$t|t�p$|ttfkS)N)r4rrr�rr)rgr	r	r
�_signature_is_builtin!s
r�cCs�t|�rt|�rdSt|dd�}t|dd�}t|dt�}t|dt�}t|dd�}t|tj�o�t|t�o�|dksxt|t�o�|dks�t|t	�o�t|t	�S)NFr�r�__defaults__�__kwdefaults__�__annotations__)
�callabler
r>�_voidrrr1r�r^r�)rgr@rkrr3r2r	r	r
�_signature_is_functionlike-s
r�cCs<|�d�}|dkr|�d�}|�d�}|�d�}|d|�S)N�,r|r��:r@r�)�find)rJrRZcposr	r	r
�_signature_get_bound_paramFs




r�cCs$|s|ddfSd}d}dd�|�d�D�}t|�j}t�|�}d}d}g}|j}	d}
tj}tj}t|�}
x�|D]�}
|
j	|
j
}}||kr�|dkr�|r�d}qnd}|
d7}
qn|d	kr�d}|
d}qn||kr�|d
kr�|
}qn|r�d}||kr�|dks�|	d�|	|�|dkrn|	d
�qnWd�|�}|||fS)NcSsg|]}|�d��qS)�ascii)�encode)rW�lr	r	r
r�psz6_signature_strip_non_python_syntax.<locals>.<listcomp>r�Frr�Tr��/�$r�z, � r�)r�r�r�r�rKr��OP�
ERRORTOKEN�nextr�stringr�)�	signature�self_parameter�last_positional_onlyr�r�Ztoken_streamZ
delayed_commaZskip_next_commarArMZcurrent_parameterr�r��trr��clean_signaturer	r	r
�"_signature_strip_non_python_syntax]sP





r�Tc	shddl�|j�t|�\}}}d|d}y��|�}Wntk
rNd}YnXt|�j�sjtd�|���|j	d}	g��j
�t��d}i�t|dd�}
|
r�t
j�|
d�}|r�|j�t
j���	�fdd�����	fdd	��
G��
fd
d�d�j���f��������fdd
�	}t|	jj�}t|	jj�}
tj||
dd�}|dk	�rJ�j�n�j�x<ttt|���D](\}\}}|||�||k�rb�j��qbW|	jj�r��j�||	jj���j�x*t|	jj |	jj!�D]\}}|||��q�W|	jj"�r��j#�||	jj"��|dk	�rZt|dd�}|dk	}t$|�}|�r@|�s4|�r@��%d�n�dj&�jd�}|�d<|�|j
d�S)Nrzdef fooz: passz"{!r} builtin has invalid signaturercs|jdkrtd��|jS)Nz'Annotations are not currently supported)r/rsrB)�node)�astr	r
�
parse_name�s
z&_signature_fromstr.<locals>.parse_namecs�yt|��}Wn>tk
rLyt|��}Wntk
rFt��YnXYnXt|t�rb��|�St|ttf�rz��|�St|t	�r���
|�S|dkr���|�St��dS)N)TFN)�eval�	NameError�RuntimeErrorrr�ZStr�int�floatZNum�bytesZBytesZNameConstant)r�rA)r��module_dict�sys_module_dictr	r
�
wrap_value�s 





z&_signature_fromstr.<locals>.wrap_valuecs(eZdZ��fdd�Z��fdd�ZdS)z,_signature_fromstr.<locals>.RewriteSymbolicscs`g}|}x"t|�j�r*|�|j�|j}q
Wt|�j�s>t��|�|j�d�t	|��}�|�S)Nr{)
rrVrKr�rA�Namer�ror��reversed)r�r��arYrA)r�r�r	r
�visit_Attribute�s
z<_signature_fromstr.<locals>.RewriteSymbolics.visit_Attributecst|j�j�st���|j�S)N)rZctxZLoadrsro)r�r�)r�r�r	r
�
visit_Name�sz7_signature_fromstr.<locals>.RewriteSymbolics.visit_NameN)r�rr�r�r�r	)r�r�r	r
�RewriteSymbolics�sr�cs��|�}|�krdS|rp|tk	rpy���|�}��|�}Wntk
rR�}YnX|�kr`dS|�k	rl|n|}���|�|�d��dS)N)r+r/)�_emptyZvisitZliteral_evalrsrK)Z	name_nodeZdefault_noder+r@�o)�	Parameterr�r�r&�invalidrhr'r�r	r
�p�s
z_signature_fromstr.<locals>.p)�	fillvaluer�)rh)r%)'r��_parameter_clsr��parse�SyntaxErrorrZModulersrtZbodyr&rr>rpr}r~r<r�ZNodeTransformerr�rr�	itertools�zip_longest�POSITIONAL_ONLY�POSITIONAL_OR_KEYWORDrErZvararg�VAR_POSITIONAL�KEYWORD_ONLYrfr	Zkw_defaultsr[�VAR_KEYWORDrr�r;)rXrgr�r r�r�r�Zprogramr�rmZmodule_namer�rrr�r�r@r+�_selfZself_isboundZ
self_ismoduler	)r�r�r�r&r�rhr�r'r�r�r�r
�_signature_fromstr�sl








r�cCsBt|�std�|���t|dd�}|s4td�|���t||||�S)Nz%{!r} is not a Python builtin function�__text_signature__z#no signature found for builtin {!r})r�r�rtr>rsr�)rXrur r�r	r	r
�_signature_from_builtin5sr�c	Cs�d}t|�s(t|�rd}ntd�|���|j}|j}|j}|j}t|d|��}|j	}||||�}	|j
}
|j}|j}|r�t
|�}
nd}
g}||
}x4|d|�D]$}|
�|t�}|�|||td��q�WxBt||d��D].\}}|
�|t�}|�|||t||d��q�W|jt@�rH|||}|
�|t�}|�|||td��xJ|	D]B}t}|dk	�rl|�|t�}|
�|t�}|�|||t|d���qNW|jt@�r�||}|jt@�r�|d7}||}|
�|t�}|�|||td��|||
�dt�|d	�S)
NFTz{!r} is not a Python functionr)r/rh)r/rhr+r�r")r%�__validate_parameters__)rr�r�rtr�rrr
r^rr�r�r�rrr~r�rKr*rErrr,r-rr.)rXruZis_duck_functionr�Z	func_codeZ	pos_countZ	arg_namesrPZkeyword_only_countZkeyword_onlyr2rr3Zpos_default_countr'Znon_default_countr@r/�offsetr+rsr	r	r
�_signature_from_functionEsj










r�)rr c
Cs�t|�std�|���t|tj�rDt|j|||d�}|r@t|�S|S|rtt	|dd�d�}t|tj�rtt||||d�Sy
|j
}Wntk
r�Yn&X|dk	r�t|t�s�td�|���|Sy
|j
}Wntk
r�YnvXt|tj��rLt|j|||d�}t||d�}t|j���d}|jtjk�r(|St|j���}|f|}	|j|	d	�St|��s`t|��rjt||�St|��r�t|||d
�St|tj��r�t|j|||d�}t||�Sd}t|t��r�t t|�d�}
|
dk	�r�t|
|||d�}nJt |d�}|dk	�rt||||d�}n$t |d
�}|dk	�r0t||||d�}|dk�r<xL|j!dd�D]:}
y
|
j"}Wntk
�rnYnX|�rJt#|||�S�qJWt|j!k�r<|j$t%j$k�r�|j&t%j&k�r�|�'t%�St(d�|���nrt|t)��s<t t|�d�}
|
dk	�r<yt|
|||d�}Wn8t(k
�r:}zd�|�}t(|�|�Wdd}~XYnX|dk	�rX|�rTt|�S|St|tj*��rxd�|�}t(|��t(d�|���dS)Nz{!r} is not a callable object)rr r!cSs
t|d�S)N�
__signature__)r)rmr	r	r
rD�rEz*_signature_from_callable.<locals>.<lambda>)rkz1unexpected object {!r} in __signature__ attribute)Nr)r')r �__call__�__new__r�r|z(no signature found for builtin type {!r}zno signature found for {!r}z,no signature found for builtin function {!r}z+callable {!r} is not supported by signature)+r�r�rtrrrr#r�r�rvr�rLr$�_partialmethod�	functools�
partialmethodrur�r^r'r(rhr�r�r;rr�r�r�r�r�rr�rjr�r�r�rr��
from_callablersr�r3)rgrr r!r0r�r�Zfirst_wrapped_paramZ
sig_paramsr�Zcall�newZinitrBZtext_sigr1rWr	r	r
r#�s�	




















r#c@seZdZdS)r�N)r�rr�r	r	r	r
r�_	sr�c@seZdZdS)r�N)r�rr�r	r	r	r
r�c	sr�c@s(eZdZdZdZdZdZdZdd�ZdS)	�_ParameterKindrr�r���cCs|jS)N)�_name_)r�r	r	r
�__str__n	sz_ParameterKind.__str__N)	r�rr�r�r�r�r�r�rr	r	r	r
r�g	sr�zpositional-onlyzpositional or keywordzvariadic positionalzkeyword-onlyzvariadic keywordc@s�eZdZdZeZeZeZ	e
ZeZ
eZeed�dd�Zdd�Zdd�Zed	d
��Zedd��Zed
d��Zedd��Zeeeed�dd�Zdd�Zdd�Zdd�Zdd�ZdS)r�)�_name�_kind�_default�_annotation)r+r/cCs yt|�|_Wn$tk
r2td|�d���YnX|tk	rf|jttfkrfd}|�t|j��}t|��||_||_	|tkr�td��t
|t�s�d�t|�j
�}t|��|ddkr�|dd���r�|jtkr�d	}|�t|j��}t|��t|_d
�|dd��}|���std�|���||_dS)Nzvalue z is not a valid Parameter.kindz({} parameters cannot have default valuesz*name is a required attribute for Parameterzname must be a str, not a {}rr{r�zLimplicit arguments must be passed as positional or keyword arguments, not {}z
implicit{}z"{!r} is not a valid parameter name)r�rrsr�r,r.rt�_get_paramkind_descrrrrr�rr�r��isdigitr*r)�isidentifierr)r�r@rhr+r/rWr	r	r
r��	s4


zParameter.__init__cCs t|�|j|jf|j|jd�fS)N)rr)rrrrr)r�r	r	r
�
__reduce__�	s
zParameter.__reduce__cCs|d|_|d|_dS)Nrr)rr)r��stater	r	r
�__setstate__�	s
zParameter.__setstate__cCs|jS)N)r)r�r	r	r
r@�	szParameter.namecCs|jS)N)r)r�r	r	r
r+�	szParameter.defaultcCs|jS)N)r)r�r	r	r
r/�	szParameter.annotationcCs|jS)N)r)r�r	r	r
rh�	szParameter.kind)r@rhr/r+cCsL|tkr|j}|tkr|j}|tkr*|j}|tkr8|j}t|�||||d�S)N)r+r/)r�rrrrr)r�r@rhr/r+r	r	r
r;�	szParameter.replacecCs�|j}|j}|jtk	r(d�|t|j��}|jtk	rb|jtk	rPd�|t|j��}nd�|t|j��}|tkrtd|}n|t	kr�d|}|S)Nz{}: {}z{} = {}z{}={}r?z**)
rhrrr�rtr<rr:r,r.)r�rh�	formattedr	r	r
r�	s



zParameter.__str__cCsd�|jj|�S)Nz	<{} "{}">)rtr�r�)r�r	r	r
�__repr__
szParameter.__repr__cCst|j|j|j|jf�S)N)�hashr@rhr/r+)r�r	r	r
�__hash__
szParameter.__hash__cCsJ||krdSt|t�stS|j|jkoH|j|jkoH|j|jkoH|j|jkS)NT)rr��NotImplementedrrrr)r��otherr	r	r
�__eq__
s
zParameter.__eq__N)r�rr��	__slots__r)r�r*r�r,r�r-r�r.r�r�r&r�r	rr[r@r+r/rhr�r;rr
rrr	r	r	r
r��	s((r�c@sdeZdZdZdd�Zedd��Zedd��Zedd	��Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dS)�BoundArguments)r��
_signature�__weakref__cCs||_||_dS)N)r�r)r�r�r�r	r	r
r�1
szBoundArguments.__init__cCs|jS)N)r)r�r	r	r
r�5
szBoundArguments.signaturec	Cs|g}xn|jj��D]^\}}|jttfkr*Py|j|}Wntk
rNPYqX|jtkrf|�	|�q|�
|�qWt|�S)N)rr'r=rhr.r-r�rjr,�extendrKr^)r�rr�r4rBr	r	r
r9
s
zBoundArguments.argsc	Cs�i}d}x�|jj��D]x\}}|sF|jttfkr6d}n||jkrFd}q|sLqy|j|}Wntk
rnYqX|jtkr�|�|�q|||<qW|S)NFT)	rr'r=rhr.r-r�rj�update)r��kwargsZkwargs_startedr�r4rBr	r	r
rP
s&

zBoundArguments.kwargsc	Cs�|j}g}x�|jj��D]v\}}y|�|||f�Wqtk
r�|jtk	rX|j}n"|jt	krhd}n|jt
krxi}nw|�||f�YqXqWt|�|_dS)Nr	)r�rr'r=rKrjr+r�rhr,r.r)r�r�Z
new_argumentsr@r4�valr	r	r
�apply_defaultsn
s	


zBoundArguments.apply_defaultscCs2||krdSt|t�stS|j|jko0|j|jkS)NT)rrrr�r�)r�rr	r	r
r�
s
zBoundArguments.__eq__cCs|d|_|d|_dS)Nrr�)rr�)r�r
r	r	r
r�
s
zBoundArguments.__setstate__cCs|j|jd�S)N)rr�)rr�)r�r	r	r
�__getstate__�
szBoundArguments.__getstate__cCsDg}x(|j��D]\}}|�d�||��qWd�|jjd�|��S)Nz{}={!r}z	<{} ({})>z, )r�r=rKrtr�r�r�)r�rrBrAr	r	r
r
�
szBoundArguments.__repr__N)r�rr�rr�r[r�rrrrrrr
r	r	r	r
r
src@s�eZdZdZeZeZeZ	d+edd�dd�Z
edd��Zed	d
��Z
edd�dd
��Zedd��Zedd��Zeed�dd�Zdd�Zdd�Zdd�Zdd�dd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�ZdS),r$)�_return_annotation�_parametersNT)r%r�cCs�|dkrt�}n�|r�t�}t}d}x�t|�D]�\}}|j}	|j}
|	|krjd}|�t|�t|	��}t|��n|	|krzd}|	}|	ttfkr�|j	t
kr�|r�d}t|��nd}|
|kr�d�|
�}t|��|||
<q,Wntdd�|D��}t�|�|_
||_dS)NFz7wrong parameter order: {} parameter before {} parameterz-non-default argument follows default argumentTzduplicate parameter name: {!r}css|]}|j|fVqdS)N)r@)rWr4r	r	r
rY�
sz%Signature.__init__.<locals>.<genexpr>)rr)rErhr@rtrrsr*r+r�r�MappingProxyTyperr)r�r'r%r�r�Ztop_kindZ
kind_defaults�idxr4rhr@rWr	r	r
r��
s>






zSignature.__init__cCstjdtdd�t||�S)Nz_inspect.Signature.from_function() is deprecated since Python 3.5, use Signature.from_callable()r�)r)rrrr�)rXrur	r	r
�
from_function�
s
zSignature.from_functioncCstjdtdd�t||�S)Nz^inspect.Signature.from_builtin() is deprecated since Python 3.5, use Signature.from_callable()r�)r)rrrr�)rXrur	r	r
�from_builtins
zSignature.from_builtin)�follow_wrappedcCst|||d�S)N)r!r)r#)rXrgr#r	r	r
r�
szSignature.from_callablecCs|jS)N)r)r�r	r	r
r'szSignature.parameterscCs|jS)N)r)r�r	r	r
r%szSignature.return_annotation)r'r%cCs0|tkr|j��}|tkr |j}t|�||d�S)N)r%)r�r'r(rr)r�r'r%r	r	r
r;s
zSignature.replacecCs8tdd�|j��D��}dd�|j��D�}|||jfS)Ncss|]}|jtkr|VqdS)N)rhr-)rWr4r	r	r
rY+sz(Signature._hash_basis.<locals>.<genexpr>cSsi|]}|jtkr||j�qSr	)rhr-r@)rWr4r	r	r
r`.sz)Signature._hash_basis.<locals>.<dictcomp>)r^r'r(r%)r�r��
kwo_paramsr	r	r
�_hash_basis*szSignature._hash_basiscCs(|��\}}}t|���}t|||f�S)N)r%�	frozensetr(r)r�r�r$r%r	r	r
r3szSignature.__hash__cCs*||krdSt|t�stS|��|��kS)NT)rr$rr%)r�rr	r	r
r8s

zSignature.__eq__F)r�cCs�t�}t|j���}d}t|�}�xxyt|�}Wn�tk
r�yt|�}	Wntk
rbPYn�X|	jtkrrPn�|	j|kr�|	jt	kr�d}
|
j
|	jd�}
t|
�d�|	f}PnH|	jtks�|	j
tk	r�|	f}Pn*|r�|	f}Pnd}
|
j
|	jd�}
t|
�d�Yq$Xyt|�}	Wn tk
�r&td�d�Yq$X|	jttfk�rBtd�d�|	jtk�rn|g}|�|�t|�||	j<P|	j|k�r�tdj
|	jd��d�|||	j<q$Wd}x�t�||�D]�}	|	jtk�r�|	}�q�|	jtk�r֐q�|	j}
y|�|
�}WnFtk
�r0|�s,|	jtk�r,|	j
tk�r,tdj
|
d��d�Yn(X|	jt	k�rPtdj
|	jd���|||
<�q�W|�r�|dk	�rz|||j<ntdj
tt|��d���|�||�S)Nr	zA{arg!r} parameter is positional only, but was passed as a keyword)rBz$missing a required argument: {arg!r}ztoo many positional argumentsz$multiple values for argument {arg!r}z*got an unexpected keyword argument {arg!r})rr�r'r(r��
StopIterationrhr,r@r)rtr�r.r+r�r-rr^r��chainr�rj�_bound_arguments_cls)r�rrr�r�r'Z
parameters_exZarg_valsZarg_valr4rWr(Zkwargs_paramr�r	r	r
�_bind?s�







zSignature._bindcOs|d�|dd�|�S)Nrr�)r*)rrr	r	r
�bind�szSignature.bindcOs|dj|dd�|dd�S)Nrr�T)r�)r*)rrr	r	r
r��szSignature.bind_partialcCs t|�t|j���fd|jifS)Nr)rr^rr(r)r�r	r	r
r	�szSignature.__reduce__cCs|d|_dS)Nr)r)r�r
r	r	r
r�szSignature.__setstate__cCsd�|jj|�S)Nz<{} {}>)rtr�r�)r�r	r	r
r
�szSignature.__repr__c	Cs�g}d}d}xr|j��D]d}t|�}|j}|tkr8d}n|rJ|�d�d}|tkrXd}n|tkrr|rr|�d�d}|�|�qW|r�|�d�d�d�	|��}|j
tk	r�t|j
�}|d�|�7}|S)NFTr�r?z({})z, z -> {})
r'r(r�rhr)rKr,r-rtr�r%r�r<)	r�reZrender_pos_only_separatorZrender_kw_only_separatorr4rrhZrenderedZannor	r	r
r�s0




zSignature.__str__)N)r�rr�rr�r�rr)r�r&r�rcr!r"r�r[r'r%r�r;r%rrr*r+r�r	rr
rr	r	r	r
r$�
s06	r$)r#cCstj||d�S)N)r#)r$r�)rgr#r	r	r
r�	sr�c
Cs�ddl}ddl}|��}|jddd�|jddddd	�|��}|j}|�d
�\}}}y|�|�}}	WnNtk
r�}
z0d�	|t
|
�j|
�}t|t
jd�t
�d
�Wdd}
~
XYnX|r�|�d�}|	}x|D]}
t||
�}q�W|	jt
jk�rtdt
jd�t
�d�|j�r�td�	|��td�	t|	���td�	|	j��||	k�r|td�	t|	j���t|	d��r�td�	|	j��n6yt|�\}}Wntk
�r�YnXtd�	|��td�ntt|��dS)NrrzCThe object to be analysed. It supports the 'module:qualname' syntax)�helpz-dz	--details�
store_truez9Display info about the module rather than its source code)�actionr,r�zFailed to import {} ({}: {}))r�r�r{z#Can't get info for builtin modules.r�z
Target: {}z
Origin: {}z
Cached: {}z
Loader: {}�__path__zSubmodule search path: {}zLine: {}r�)�argparser��ArgumentParser�add_argument�
parse_argsr�	partition�
import_moduler_rtrr��printrp�stderr�exitr�r>�builtin_module_namesZdetailsr��
__cached__r:r�rr/r�r�)r0r��parserr�targetZmod_nameZ	has_attrsZattrsrgr�rfrW�parts�part�__rrr	r	r
�_mainsV




r@r�)N)N)N)F)N)r�)r�)r�)r�)r�)r	)T)T)��
__author__r*�disZcollections.abcr)�enumZimportlib.machineryr�r�r�r�r�rpr�r�rrr�r��operatorrrr�globalsZmod_dictZCOMPILER_FLAG_NAMESr=rSrTr9rr
rrrrrrrrr r!r#r%r'r,r.r0r2r4r5rCrUrVrirGrvrzr�r�r�r�r�r�r�r�r�r�r�r�r�r_r�r�r�r�r�r�rrrrrrrrr5r8r<r>r�rKrNrUrXr\r]rlrmrtru�_fieldsrvrzr}rr�r�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�Z_WrapperDescriptor�allZ_MethodWrapperr�r<Z_ClassMethodWrapperr3r�r�r�r�r�r�r�r�r�r�r�r#r�r��IntEnumr�r�r)r�r*r�r,r�r-r�r.Z_PARAM_NAME_MAPPING�__getitem__rr�rr$r�r@r�r	r	r	r
�<module>s`	



	
	
,
t$
;
	
.I-7





[


	4>
5

 



		0


LH

RHk:


Hacked By AnonymousFox1.0, Coded By AnonymousFox