AlkantarClanX12

Your IP : 3.145.180.152


Current Path : /lib64/python3.8/__pycache__/
Upload File :
Current File : //lib64/python3.8/__pycache__/inspect.cpython-38.opt-2.pyc

U

e5d��@s�dZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlmZddlmZmZe�Zej��D]\ZZeede<q�dZdd�Zd	d
�Zdd�Z d
d�Z!dd�Z"e#ed��rdd�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�Z3d5d6�Z4d�d7d8�Z5ed9d:�Z6d;d<�Z7d=d>�Z8dd?�d@dA�Z9dBdC�Z:dDdE�Z;dFdG�Z<dHdI�Z=dJdK�Z>dLdM�Z?dNdO�Z@dPdQ�ZAd�dRdS�ZBiZCiZDd�dTdU�ZEdVdW�ZFdXdY�ZGGdZd[�d[eH�ZIGd\d]�d]�ZJd^d_�ZKd`da�ZLdbdc�ZMddde�ZNd�dgdh�ZOedidj�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��dd�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�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�/usr/lib64/python3.8/inspect.py�ismodule?sr
cCs
t|t�Sr)r�typer	rrr�isclassHsrcCst|tj�Sr)rr�
MethodTyper	rrr�ismethodPsrcCs:t|�st|�st|�rdSt|�}t|d�o8t|d�S)NF�__get__�__set__�rr�
isfunctionr�hasattr�r
�tprrr�ismethoddescriptorZsrcCs8t|�st|�st|�rdSt|�}t|d�p6t|d�S)NFr�
__delete__rrrrr�isdatadescriptornsr�MemberDescriptorTypecCst|tj�Sr)rrrr	rrr�ismemberdescriptor~srcCsdS�NFrr	rrrr�s�GetSetDescriptorTypecCst|tj�Sr)rrrr	rrr�isgetsetdescriptor�sr cCsdSrrr	rrrr �scCst|tj�Sr)rr�FunctionTyper	rrrr�srcCs6t|�r|j}qt�|�}t|�s&dSt|jj|@�Sr)r�__func__�	functools�_unwrap_partialr�bool�__code__�co_flags)�f�flagrrr�_has_code_flag�s
r*cCs
t|t�Sr)r*ZCO_GENERATOR��objrrr�isgeneratorfunction�sr-cCs
t|t�Sr)r*ZCO_COROUTINEr+rrr�iscoroutinefunction�sr.cCs
t|t�Sr)r*ZCO_ASYNC_GENERATORr+rrr�isasyncgenfunction�sr/cCst|tj�Sr)rr�AsyncGeneratorTyper	rrr�
isasyncgen�sr1cCst|tj�Sr)rr�
GeneratorTyper	rrr�isgenerator�sr3cCst|tj�Sr)rr�
CoroutineTyper	rrr�iscoroutine�sr5cCs6t|tj�p4t|tj�r(t|jjt@�p4t|tj	j
�Sr)rrr4r2r%�gi_coder'ZCO_ITERABLE_COROUTINE�collections�abc�	Awaitabler	rrr�isawaitable�s��r:cCst|tj�Sr)rr�
TracebackTyper	rrr�istraceback�sr<cCst|tj�Sr)rr�	FrameTyper	rrr�isframe�sr>cCst|tj�Sr)rr�CodeTyper	rrr�iscodesr@cCst|tj�Sr)rr�BuiltinFunctionTyper	rrr�	isbuiltinsrBcCs t|�pt|�pt|�pt|�Sr)rBrrrr	rrr�	isroutine&s���rCcCs�t|t�sdS|jt@rdStt|�tj�s0dSt|d�r>dS|j�	�D]\}}t
|dd�rHdSqH|jD]6}t
|dd�D]$}t
||d�}t
|dd�rzdSqzqjdS)NFT�__abstractmethods__�__isabstractmethod__r)rr�	__flags__�TPFLAGS_IS_ABSTRACT�
issubclassr8�ABCMetar�__dict__�items�getattr�	__bases__)r
�name�value�baserrr�
isabstract-s"



rQc	Cst|�r|ft|�}nd}g}t�}t|�}z:|jD].}|j��D]\}}t|tj	�rD|�
|�qDq6Wntk
r|YnX|D]~}	zt||	�}
|	|kr�t�Wn:tk
r�|D]}|	|jkr�|j|	}
q�q�Yq�YnX|r�||
�r�|�
|	|
f�|�
|	�q�|jdd�d�|S)NrcSs|dS)Nrr)Zpairrrr�<lambda>n�zgetmembers.<locals>.<lambda>��key)r�getmro�set�dirrMrJrKrr�DynamicClassAttribute�append�AttributeErrorrL�add�sort)r
Z	predicate�mro�results�	processed�namesrP�k�vrUrOrrr�
getmembersEs:




rd�	Attributezname kind defining_class objectcCsTt|�}tt|��}tdd�|D��}|f|}||}t|�}|D].}|j��D]\}}t|tj�rR|�	|�qRqDg}	t
�}
|D�]�}d}d}
d}||
k�rzz|dkr�td��t||�}
Wn"tk
r�}zW5d}~XYn�Xt|
d|�}||k�rzd}d}|D] }t||d�}||
k�r|}�q|D]B}z|�
||�}Wntk
�rXY�q(YnX||
k�r(|}�q(|dk	�rz|}|D]0}||jk�r~|j|}||k�r�|}�q��q~|dk�r�q�|
dk	�r�|
n|}t|ttjf��r�d}|}nFt|ttjf��rd}|}n*t|t��rd}|}nt|��r,d	}nd
}|	�	t||||��|
�|�q�|	S)Ncss|]}|ttfkr|VqdSr)rr
)�.0�clsrrr�	<genexpr>�sz'classify_class_attrs.<locals>.<genexpr>rJz)__dict__ is special, don't want the proxy�__objclass__z
static methodzclass method�property�method�data)rVr�tuplerXrJrKrrrYrZrW�	ExceptionrL�__getattr__r[�staticmethod�BuiltinMethodType�classmethod�ClassMethodDescriptorTyperjrCrer\)rgr^ZmetamroZclass_basesZ	all_basesrarPrbrc�resultr`rNZhomeclsZget_objZdict_obj�excZlast_clsZsrch_clsZsrch_objr,�kindrrr�classify_class_attrsss�












rwcCs|jSr)�__mro__)rgrrrrV�srV��stopcs|�dkrdd�}n�fdd�}|}t|�|i}t��}||�rx|j}t|�}||ks`t|�|krntd�|���|||<q6|S)NcSs
t|d�S�N�__wrapped__�r�r(rrr�_is_wrapper�szunwrap.<locals>._is_wrappercst|d�o�|�Sr{r}r~ryrrrsz!wrapper loop when unwrapping {!r})�id�sys�getrecursionlimitr|�len�
ValueError�format)�funcrzrr(ZmemoZrecursion_limitZid_funcrryr�unwrap�s

r�cCs|��}t|�t|���Sr)�
expandtabsr��lstrip)�lineZexplinerrr�
indentsizesr�cCsNtj�|j�}|dkrdS|j�d�dd�D]}t||�}q.t|�sJdS|S)N�.���)r��modules�get�
__module__�__qualname__�splitrLr)r�rgrNrrr�
_findclasssr�c	Cst|�rT|jD]@}|tk	rz
|j}Wntk
r<YqYnX|dk	r|SqdSt|�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
}n�t|t��rP|j}|j}t|�}|dk�sJt	||�|k	�r�dSnnt|��sdt|��r�|j}|j}t	||�|k	�r�dSt|��r�t	|dd�}t|t��r�||k�r�||SndS|jD]F}zt	||�j}Wntk
�r�Y�q�YnX|dk	�r�|S�q�dS)Nr"r��	__slots__)rrxr
�__doc__r[rr"�__name__�__self__rL�	__class__rr�rBr�rrj�fgetrrrir�dict)r,rP�docrN�selfrgr��slotsrrr�_finddoc sn



�


�



r�c	Cshz
|j}Wntk
r YdSX|dkrRzt|�}Wnttfk
rPYdSXt|t�s`dSt|�Sr)r�r[r��	TypeErrorr�str�cleandoc)r
r�rrr�getdoc^s

r�cCs�z|���d�}Wntk
r(YdSXtj}|dd�D]*}t|���}|r<t|�|}t||�}q<|r||d��|d<|tjkr�tdt|��D]}|||d�||<q�|r�|ds�|�	�q�|r�|ds�|�	d�q�d�
|�SdS)N�
�rr�)r�r��UnicodeErrorr��maxsizer�r��min�range�pop�join)r��linesZmarginr�Zcontent�indent�irrrr�qs(

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 moduler�z{!r} is a built-in classzVmodule, class, method, function, traceback, frame, or code object was expected, got {})r
rLr�r�r�rrr�r�r�r�rr"rr&r<�tb_framer>�f_coder@�co_filenamerr�)r
�modulerrr�getfile�s.
�r�cCsTtj�|�}dd�tj��D�}|��|D]"\}}|�|�r,|d|�Sq,dS)NcSsg|]}t|�|f�qSr)r�)rf�suffixrrr�
<listcomp>�s�z!getmodulename.<locals>.<listcomp>)�os�path�basename�	importlib�	machinery�all_suffixesr]�endswith)r�Zfname�suffixesZneglenr�rrr�
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|]}��|�VqdSr�r��rf�s��filenamerrrh�sz getsourcefile.<locals>.<genexpr>rc3s|]}��|�VqdSrr�r�r�rrrh�s�
__loader__)r�r�r��DEBUG_BYTECODE_SUFFIXES�OPTIMIZED_BYTECODE_SUFFIXES�anyr�r��splitext�SOURCE_SUFFIXES�EXTENSION_SUFFIXES�existsrL�	getmodule�	linecache�cache)r
Zall_bytecode_suffixesrr�r�
getsourcefile�s"
��
r�cCs,|dkrt|�pt|�}tj�tj�|��Sr)r�r�r�r��normcase�abspath)r
�	_filenamerrr�
getabsfile�sr�c
Cs�t|�r|St|d�r$tj�|j�S|dk	rD|tkrDtj�t|�Szt||�}Wntk
rhYdSX|tkr�tj�t|�Stj�	��
�D]\\}}t|�r�t|d�r�|j}|t�|d�kr�q�|t|<t|�}|j
t|<ttj�|�<q�|tk�rtj�t|�Stjd}t|d��s"dSt||j
��rJt||j
�}||k�rJ|Stjd}t||j
��r|t||j
�}	|	|k�r||SdS)Nr�r��__main__r��builtins)r
rr�r�r�r��
modulesbyfiler�r��copyrKr��_filesbymodnamer�r�r��realpathrL)
r
r��file�modnamer�r(�mainZ
mainobjectZbuiltinZ
builtinobjectrrrr��sJ
�

�




r�cCs�t|�}|rt�|�n$t|�}|�d�r4|�d�s<td��t||�}|rZt�||j	�}n
t�|�}|sptd��t
|�r�|dfSt|��r |j}t
�d|d�}g}tt|��D]F}|�||�}|r�||ddkr�||fS|�|�d	�|f�q�|�r|��||dd	fStd
��t|��r0|j}t|��r@|j}t|��rP|j}t|��r`|j}t|��r�t|d��s~td��|jd	}	t
�d
�}|	dk�r�z||	}
Wnt k
�r�td��YnX|�|
��rؐq�|	d	}	�q�||	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*@)zlineno is out of boundszcould not find code object)!r�r��
checkcacher��
startswithr��OSErrorr��getlinesrJr
rr��re�compiler�r��matchrZ�groupr]rr"rr&r<r�r>r�r@rr��
IndexError)r
r�r�r�rNZpatZ
candidatesr�r��lnumr�rrr�
findsourcesf










r�c	Cs.zt|�\}}Wnttfk
r*YdSXt|�r�d}|rT|ddd�dkrTd}|t|�krz||��dkrz|d}qT|t|�kr�||dd�dkr�g}|}|t|�kr�||dd�dkr�|�||���|d}q�d�|�S�n>|dk�r*t	||�}|d}|dk�r*||�
�dd�dk�r*t	||�|k�r*||���
�g}|dk�r�|d}||���
�}|dd�dk�r�t	||�|k�r�|g|dd�<|d}|dk�r��q�||���
�}�qt|�r�|d��dk�r�g|dd�<�q�|�r |d��dk�r g|dd�<�q�d�|�SdS)	Nr�z#!r�)��#r�r�r�)r�r�r�r
r��striprZr�r�r�r�)r
r�r��startZcomments�endr�Zcommentrrr�getcommentsRsL
  

$�
$
r�c@seZdZdS)�
EndOfBlockN�r�r�r�rrrrr�sr�c@seZdZdd�Zdd�ZdS)�BlockFindercCs4d|_d|_d|_d|_d|_d|_d|_d|_dS)NrFr�)r��islambda�started�passline�indecorator�decoratorhasargs�last�	body_col0�r�rrr�__init__�szBlockFinder.__init__cCsr|jsB|jsB|dkrd|_n|dkr8|dkr2d|_d|_d|_�n,|dkrZ|jrVd|_�n|dkrv|jrtd|_d|_n�|tjkr�d|_|d|_|jr�t�|jr�|js�d|_n�|jr�n�|tj	kr�|j
dkr�|jr�|d	|_
|jd	|_d|_n�|tjk�r|jd	|_|jdk�rnt�nV|tj
k�rL|j
dk	�rn|d	|j
k�rn|d|_n"|jdk�rn|tj
tjfk�rnt�dS)
N�@T)�def�class�lambdar�(�)Frr�)r�r�r�r�r��tokenize�NEWLINEr�r��INDENTr�r��DEDENT�COMMENT�NL)r�r�tokenZsrowcolZerowcolr�rrr�
tokeneater�sL





zBlockFinder.tokeneaterN)r�r�r�r�rrrrrr��s
r�c	CsVt�}z(t�t|�j�}|D]}|j|�qWnttfk
rFYnX|d|j�Sr)	r�r�generate_tokens�iter�__next__rr��IndentationErrorr�)r�Zblockfinder�tokensZ_tokenrrr�getblock�srcCsbt|�}t|�\}}t|�r"|j}t|�s>t|�rF|jjdkrF|dfSt||d��|dfSdS)Nz<module>rr�)	r�r�r<r�r
r>r��co_namer�r
r�r�rrr�getsourcelines�s�
�rcCst|�\}}d�|�S)Nr�)rr�rrrr�	getsource�srcCsRg}|jtdd�d�|D]2}|�||jf�||kr|�t||||��q|S)Nr�r�rT)r]rrZrM�walktree)�classes�children�parentr_r�rrrr�srFcCs�i}g}|D]d}|jr^|jD]>}||kr0g||<|||krJ||�|�|r||krqpqq||kr|�|�q|D]}||krv|�|�qvt||d�Sr)rMrZr)r�uniquer�rootsr�rrrr�getclasstree�s"	
r�	Argumentszargs, varargs, varkwc	Cs�t|�std�|���|j}|j}|j}t|d|��}t||||��}d}||7}d}|jt@rx|j|}|d}d}|jt	@r�|j|}t
||||�S)Nz{!r} is not a code objectrr�)r@r�r��co_varnames�co_argcount�co_kwonlyargcount�listr'�
CO_VARARGS�CO_VARKEYWORDSr)	�cora�nargsZnkwargs�args�
kwonlyargs�step�varargs�varkwrrr�getargss"



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���
stacklevelzgFunction has keyword-only parameters or annotations, use inspect.signature() API which can support them)�warnings�warn�DeprecationWarning�getfullargspecr�r-)r�r'r*r+�defaultsr(�kwonlydefaults�annrrr�
getargspec-s��r7�FullArgSpeczGargs, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotationsc
Cs|zt|ddtd�}Wn,tk
r@}ztd�|�W5d}~XYnXg}d}d}g}g}d}i}	d}i}
|j|jk	r||j|	d<|j��D]�}|j}|j	}
|t
kr�|�|
�|j|jk	r�||jf7}nv|t
kr�|�|
�|j|jk	r�||jf7}nJ|tkr�|
}n<|tk�r*|�|
�|j|jk	�r8|j|
|
<n|tk�r8|
}|j|jk	r�|j|	|
<q�|
�sZd}
|�sdd}t|||||||
|	�S)NF��follow_wrapper_chains�skip_bound_arg�sigclszunsupported callabler�return)�_signature_from_callable�	Signaturernr��return_annotation�empty�
parameters�valuesrvrN�_POSITIONAL_ONLYrZ�default�_POSITIONAL_OR_KEYWORD�_VAR_POSITIONAL�
_KEYWORD_ONLY�_VAR_KEYWORD�
annotationr8)r��sig�exr'r*r+Zposonlyargsr(r4�annotations�
kwdefaults�paramrvrNrrrr3Nsb�






�r3�ArgInfozargs varargs keywords localscCs t|j�\}}}t||||j�Sr)r,r�rP�f_locals)�framer'r*r+rrr�getargvalues�srScCsVt|dd�dkr t|��dd�St|t�rN|jd|fkr>|jS|jd|jSt|�S)Nr��typingztyping.r�r�r�)rL�repr�replacerrr�r�)rJZbase_modulerrr�formatannotation�s
rWcst|dd���fdd�}|S)Nr�cs
t|��Sr)rW)rJ�r�rr�_formatannotation�sz5formatannotationrelativeto.<locals>._formatannotation)rL)r
rYrrXr�formatannotationrelativeto�srZrcCsd|S�N�*r�rNrrrrR�rSrRcCsd|S�N�**rr]rrrrR�rScCsdt|�S�N�=�rU�rOrrrrR�rScCsd|S)Nz -> r)�textrrrrR�rSc
s<ddlm}
|
dtdd����fdd�}g}|rBt|�t|�}t|�D]:\}}||�}|rz||krz||
|||�}|�|�qJ|dk	r�|�|||���n|r�|�d�|r�|D]2}||�}|r�||kr�||
||�7}|�|�q�|dk	�r|�|	||���d	d
�|�d}d�k�r8||��d��7}|S)
Nr)r1zc`formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directlyr�r.cs(�|�}|�kr$|d��|�7}|S)Nz: r)�argrt�rMrW�	formatargrr�formatargandannotation�sz-formatargspec.<locals>.formatargandannotationr\r�, rr=)r0r1r2r��	enumeraterZr�)r'r*r+r4r(r5rMrg�
formatvarargs�formatvarkw�formatvalueZ
formatreturnsrWr1rh�specsZfirstdefaultr�re�specZ	kwonlyargrtrrfr�
formatargspec�s<�


rpcCsd|Sr[rr]rrrrRrScCsd|Sr^rr]rrrrRrScCsdt|�Sr`rbrcrrrrRrScCs�|||fdd�}g}	tt|��D]}
|	�|||
��q |rV|	�||�|||��|rt|	�||�|||��dd�|	�dS)NcSs||�|||�Srr)rN�localsrgrmrrr�convertsz formatargvalues.<locals>.convertrrir)r�r�rZr�)r'r*r+rqrgrkrlrmrrrnr�rrr�formatargvaluess�
rscs��fdd�|D�}t|�}|dkr,|d}n>|dkr@dj|�}n*dj|dd��}|dd�=d	�|�|}td
|||rzdnd|dkr�d
nd|f��dS)Ncsg|]}|�krt|��qSrrb)rfrN�rCrrr�sz&_missing_arguments.<locals>.<listcomp>r�rr�z	{} and {}z, {} and {}���riz*%s() missing %i required %s argument%s: %s�
positional�keyword-onlyr�r�)r�r�r�r�)�f_nameZargnames�posrCra�missingr��tailrrtr�_missing_argumentss 


��r|c
	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|�qSrr)rfrertrr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)r�r�r�)
rxr'Zkwonlyr*ZdefcountZgivenrCZatleastZkwonly_givenZpluralrKZ
kwonly_sig�msgrrtr�	_too_many's*���r~cOst|�}|\}}}}}}	}
|j}i}t|�rB|jdk	rB|jf|}t|�}
t|�}|r^t|�nd}t|
|�}t|�D]}|||||<qt|r�t||d��||<t||�}|r�i||<|�	�D]T\}}||kr�|s�t
d||f��||||<q�||k�rt
d||f��|||<q�|
|k�r<|�s<t||||||
|�|
|k�r�|d||�}|D]}||k�rZt||d|��qZt
|||d��D] \}}||k�r�||||<�q�d}|D]6}||k�r�|	�r�||	k�r�|	|||<n|d7}�q�|�rt||d|�|S)Nrz*%s() got an unexpected keyword argument %rz(%s() got multiple values for argument %rTr�F)r3r�rr�r�r�r�rmrWrKr�r~r|rj)r�rvZnamedror'r*r+r4r(r5r6rxZ	arg2valueZnum_posZnum_argsZnum_defaults�nr�Zpossible_kwargs�kwrOZreqrerz�kwargrrr�getcallargs<sh
�
�
�



r��ClosureVarsz"nonlocals globals builtins unboundc	Cs�t|�r|j}t|�s$td�|���|j}|jdkr:i}ndd�t|j|j�D�}|j	}|�
dtj�}t
|�rt|j}i}i}t�}|jD]d}|dkr�q�z||||<Wq�tk
r�z||||<Wntk
r�|�|�YnXYq�Xq�t||||�S)N�{!r} is not a Python functioncSsi|]\}}||j�qSr)�
cell_contents)rf�varZcellrrr�
<dictcomp>�s�z"getclosurevars.<locals>.<dictcomp>�__builtins__)�None�True�False)rr"rr�r�r&�__closure__�zip�co_freevars�__globals__r�r�rJr
rW�co_names�KeyErrorr\r�)	r��codeZ
nonlocal_varsZ	global_nsZ
builtin_nsZglobal_varsZbuiltin_varsZ
unbound_namesrNrrr�getclosurevarszs>	
�
�r��	Tracebackz+filename lineno function code_context indexr�cCs�t|�r|j}|j}n|j}t|�s2td�|���t|�p@t|�}|dkr�|d|d}zt	|�\}}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_linenor>r�r�r�r�r�r��maxr�r�r�r�r)rR�context�linenor�r�r�r��indexrrr�getframeinfo�s$r�cCs|jSr)r��rRrrr�	getlineno�sr��	FrameInfor�cCs2g}|r.|ft||�}|�t|��|j}q|Sr)r�rZr��f_back)rRr��	framelist�	frameinforrr�getouterframes�sr�cCs4g}|r0|jft||�}|�t|��|j}q|Sr)r�r�rZr��tb_next)�tbr�r�r�rrr�getinnerframes�sr�cCsttd�rt�d�SdS)N�	_getframer�)rr�r�rrrr�currentframe�sr�cCstt�d�|�S)Nr�)r�r�r��r�rrr�stack�sr�cCstt��d|�S)Nr�)r�r��exc_infor�rrr�trace�sr�cCstjd�|�S)Nrx)rrJr)�klassrrr�_static_getmrosr�cCs8i}zt�|d�}Wntk
r(YnXt�||t�S�NrJ)r
�__getattribute__r[r�r��	_sentinel)r,�attrZ
instance_dictrrr�_check_instancesr�c	CsHt|�D]:}tt|��tkrz|j|WStk
r@YqXqtSr)r��_shadowed_dictrr�rJr�)r�r��entryrrr�_check_class
sr�cCs(zt|�Wntk
r"YdSXdS�NFT)r�r�r+rrr�_is_types
r�c	Csntjd}t|�D]V}z|�|�d}Wntk
r<YqXt|�tjkr`|jdkr`|j|ks|Sqt	Sr�)
rrJr�rr�rrr�rir�)r��	dict_attrr�Z
class_dictrrr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�tt|��D]:}tt|��tkr�z|j	|WSt
k
r�Yq�Xq�|tk	r�|St|��dS)Nrr)r�r�rr�rrr�r�r�rJr�r[)r,r�rEZinstance_resultr�r�Zklass_resultr�rrr�getattr_static+s:�
�r��GEN_CREATED�GEN_RUNNING�
GEN_SUSPENDED�
GEN_CLOSEDcCs,|jr
tS|jdkrtS|jjdkr(tStS�Nr�)�
gi_runningr��gi_framer��f_lastir�r�)�	generatorrrr�getgeneratorstate`s	
r�cCs:t|�std�|���t|dd�}|dk	r2|jjSiSdS)Nz{!r} is not a Python generatorr�)r3r�r�rLr�rQ)r�rRrrr�getgeneratorlocalsrsr��CORO_CREATED�CORO_RUNNING�CORO_SUSPENDED�CORO_CLOSEDcCs,|jr
tS|jdkrtS|jjdkr(tStSr�)�
cr_runningr��cr_framer�r�r�r�)�	coroutinerrr�getcoroutinestate�s	
r�cCs"t|dd�}|dk	r|jSiSdS)Nr�)rLrQ)r�rRrrr�getcoroutinelocals�sr��
from_bytescCs8zt||�}Wntk
r$YdSXt|t�s4|SdSr)rLr[r�_NonUserDefinedCallables)rgZmethod_nameZmethrrr�"_signature_get_user_defined_method�s
r�c
Cs�|j}t|���}|jpd}|jp$i}|r2||}z|j||�}Wn6tk
rx}zd�|�}	t|	�|�W5d}~XYnXd}
|��D]�\}}z|j	|}
Wnt
k
r�YnjX|jtkr�|�
|�q�|jtkr�||kr�d}
|j|
d�||<n|�
|j�q�|jtk�r|j|
d�||<|
r�|jtk�rN||jtd�}|||<|�|�q�|jttfk�rj|�|�q�|jtkr�|�
|j�q�|j|��d�S)Nrz+partial object {!r} has incorrect argumentsFT)rE�rv�rB)rBrrKr'�keywords�bind_partialr�r�r��	argumentsr�rvrDr�rFrVrNrH�move_to_endrIrGrC)�wrapped_sig�partialZ
extra_argsZ
old_params�
new_paramsZpartial_argsZpartial_keywordsZbarLr}Ztransform_to_kwonly�
param_namerOZ	arg_valueZ	new_paramrrr�_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 typer�)rmrBrCrvrIrHr�rFrDrGrV)rK�paramsrvrrr�_signature_bound_methods
r�cCs&t|�p$t|�p$t|t�p$|ttfkSr)rBrrr�rr
r+rrr�_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__)
�callablerrL�_voidrrr?r�rmr�)r,rNr�r4rNrMrrr�_signature_is_functionlike:s ����r�cCs<|�d�}|dkr|�d�}|�d�}|�d�}|d|�S)N�,r�r�:rar�)�find)roryZcposrrr�_signature_get_bound_paramSs




r�cCs |s|ddfSd}d}dd�|�d�D�}t|�j}t�|�}d}d}g}|j}	d}
tj}tj}t|�}
|D]�}
|
j	|
j
}}||kr�|dkr�|r�d}qld}|
d7}
ql|d	kr�d}|
d}ql||kr�|d
kr�|
}ql|r�d}||kr�|dks�|	d�|	|�|dkrl|	d
�qld�|�}|||fS)NcSsg|]}|�d��qS)�ascii)�encode)rf�lrrrr�}sz6_signature_strip_non_python_syntax.<locals>.<listcomp>r�Frr�Tr��/�$rri� r�)r�rrrrZr�OP�
ERRORTOKEN�nextr�stringr�)�	signature�self_parameter�last_positional_onlyr�r�Ztoken_streamZ
delayed_commaZskip_next_commardr\Zcurrent_parameterr�r��trr��clean_signaturerrr�"_signature_strip_non_python_syntaxjsP





r�Tc	s`ddl�|j�t|�\}}}d|d}z��|�}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�ttt|���D](\}\}}|||�||k�r`�j��q`|	jj�r��j�||	jj���j�t|	jj |	jj!�D]\}}|||��q�|	jj"�r�j#�||	jj"��|dk	�rRt|dd�}|dk	}t$|�}|�r8|�s,|�r8��%d�n�dj&�jd�}|�d<|�|j
d�S)Nrzdef fooz: passz"{!r} builtin has invalid signaturer�cs|jdk	rtd��|jS)Nz'Annotations are not currently supported)rJr�re)�node)�astrr�
parse_name�s
z&_signature_fromstr.<locals>.parse_namecs|zt|��}Wn>tk
rLzt|��}Wntk
rFt��YnXYnXt|tttttt	d�f�rr��
|�St��dSr)�eval�	NameError�RuntimeErrorrr��int�float�bytesr%rZConstant)r�rO)r��module_dict�sys_module_dictrr�
wrap_value�s
z&_signature_fromstr.<locals>.wrap_valuecs(eZdZ��fdd�Z��fdd�ZdS)z,_signature_fromstr.<locals>.RewriteSymbolicscs\g}|}t|�j�r(|�|j�|j}qt|�j�s:t��|�|j�d�t	|��}�|�S)Nr�)
rrerZr�rO�Namer�r�r��reversed)r�r��arrO�r�rrr�visit_Attribute�sz<_signature_fromstr.<locals>.RewriteSymbolics.visit_Attributecst|j�j�st���|j�Sr)rZctxZLoadr�r�)r�r�rrr�
visit_Name�sz7_signature_fromstr.<locals>.RewriteSymbolics.visit_NameN)r�r�r�r	r
rrrr�RewriteSymbolics�srcs��|�}|�krdS|rp|tk	rpz���|�}��|�}Wntk
rR�}YnX|�kr`dS|�k	rl|n|}���|�|�d��dS�N�rErJ)�_emptyZvisitZliteral_evalr�rZ)Z	name_nodeZdefault_noderErN�o)�	Parameterrr�rA�invalidrvrBr�rr�p�s
z_signature_fromstr.<locals>.p)�	fillvaluer�r��r@)'r��_parameter_clsr��parse�SyntaxErrorrZModuler�r�ZbodyrAr
rLr�r�r�rJr�ZNodeTransformerrr'r4�	itertools�zip_longest�POSITIONAL_ONLY�POSITIONAL_OR_KEYWORDrjr"Zvararg�VAR_POSITIONAL�KEYWORD_ONLYr�r(Zkw_defaultsr��VAR_KEYWORDr
r�rV)rgr,r�r;r�r�r�Zprogramr�r(Zmodule_namerr'r4rr�rNrEZ_selfZself_isboundZ
self_ismoduler)rrr�rArrvrrBr�rrr�_signature_fromstr�sn�










rcCsBt|�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�r�rLr�r)rgr�r;r�rrr�_signature_from_builtin<s�r!c	CsHd}t|�s(t|�rd}ntd�|���t|dd�}|rFt||||�S|j}|j}|j}|j	}|j
}	|d|�}
|j}||||�}|j}
|j
}|j}|r�t|�}nd}g}||}|	}|
d|�D]<}|r�tnt}|
�|t�}|�||||d��|r�|d8}q�t|
|d��D]L\}}|�r&tnt}|
�|t�}|�||||||d��|�r|d8}�q|jt@�r�|||}|
�|t�}|�|||td��|D]B}t}|dk	�r�|�|t�}|
�|t�}|�|||t|d���q�|jt@�r2||}|jt@�r
|d7}||}|
�|t�}|�|||td��|||
�d	t�|d
�S)NFTr�r r)rJrvr�)rJrvrEr=�r@�__validate_parameters__)rr�r�r�rLrrr&r r�co_posonlyargcountr!r�r�r�r�rDrFr�rrZrjr'r#rGrHr$rI)rgr�r;Zis_duck_functionr�rZ	func_codeZ	pos_countZ	arg_namesZ
posonly_countrvZkeyword_only_countZkeyword_onlyrMr4rNZpos_default_countrBZnon_default_countZposonly_leftrNrvrJ�offsetrEr�rrr�_signature_from_functionLs�

�

�
�

�
�
�r&)r:r;c
Cs�t|�std�|���t|tj�rDt|j|||d�}|r@t|�S|S|rtt	|dd�d�}t|tj�rtt||||d�Sz
|j
}Wntk
r�Yn&X|dk	r�t|t�s�td�|���|Sz
|j
}Wntk
r�YnvXt|tj��rLt|j|||d�}t||d�}t|j���d}|jtjk�r(|St|j���}|f|}	|j|	d	�St|��s`t|��rnt|||d
�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	�rt||||d�}n$t |d
�}|dk	�r4t||||d�}|dk�r@|j!dd�D]>}
z
|
j"}Wntk
�rpYnX|�rLt#|||�S�qLt|j!k�r@|j$t%j$k�r�|j&t%j&k�r�|�'t%�St(d�|���nrt|t)��s@t t|�d�}
|
dk	�r@zt|
|||d�}Wn8t(k
�r>}zd�|�}t(|�|�W5d}~XYnX|dk	�r\|�rXt|�S|St|tj*��r|d�|�}t(|��t(d�|���dS)Nz{!r} is not a callable objectr9cSs
t|d�S)N�
__signature__r}r~rrrrR�rSz*_signature_from_callable.<locals>.<lambda>ryz1unexpected object {!r} in __signature__ attributerrr�)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�r�rrrr>r"r�r�r'r[r?�_partialmethodr#�
partialmethodr�r�rmrBrCrvrrrVrr�r&r�r!r�rr�rxr rr�r
r)�
from_callabler�r�rA)r,r:r;r<rKr+r�Zfirst_wrapped_paramZ
sig_paramsr�Zcall�newZinitrPZtext_sigrLr}rrrr>�s	��

��
�
�
��

�

�

�


�
�
�



r>c@seZdZdS)r�Nr�rrrrr�t	sr�c@seZdZdS)rNr�rrrrrx	src@s4eZdZdZdZdZdZdZdd�Ze	dd	��Z
d
S)�_ParameterKindrr�r���cCs|jSr)�_name_r�rrr�__str__�	sz_ParameterKind.__str__cCst|Sr)�_PARAM_NAME_MAPPINGr�rrr�description�	sz_ParameterKind.descriptionN)r�r�r�rrrrrr2rjr4rrrrr.|	sr.zpositional-onlyzpositional or keywordzvariadic positionalrwzvariadic 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�_annotationr
cCszt|�|_Wn$tk
r2td|�d���YnX|tk	rd|jttfkrdd}|�|jj�}t|��||_||_	|tkr�td��t
|t�s�d�t|�j
�}t|��|ddkr�|dd���r�|jtkr�d	}|�|jj�}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.r6r�rrGrIr�r4r7r8rr�rr�r��isdigitrFrD�isidentifierr5)r�rNrvrErJr}rrrr��	s6

�
zParameter.__init__cCs t|�|j|jf|j|jd�fS)N�r7r8)rr5r6r7r8r�rrr�
__reduce__�	s
��zParameter.__reduce__cCs|d|_|d|_dS)Nr7r8r;�r��staterrr�__setstate__�	s
zParameter.__setstate__cCs|jSr)r5r�rrrrN�	szParameter.namecCs|jSr)r7r�rrrrE�	szParameter.defaultcCs|jSr)r8r�rrrrJ�	szParameter.annotationcCs|jSr)r6r�rrrrv�	szParameter.kind)rNrvrJrEcCsL|tkr|j}|tkr|j}|tkr*|j}|tkr8|j}t|�||||d�Sr)r�r5r6r8r7r)r�rNrvrJrErrrrV�	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\r_)
rvr5r8rr�rWr7rUrGrI)r�rv�	formattedrrrr2
s
�


zParameter.__str__cCsd�|jj|�S)Nz	<{} "{}">�r�r�r�r�rrr�__repr__#
szParameter.__repr__cCst|j|j|j|jf�Sr)�hashrNrvrJrEr�rrr�__hash__&
szParameter.__hash__cCsJ||krdSt|t�stS|j|jkoH|j|jkoH|j|jkoH|j|jkS�NT)rr�NotImplementedr5r6r7r8�r��otherrrr�__eq__)
s

�
�
�zParameter.__eq__N)r�r�r�r�rDrrFrrGrrHrrIrrrAr�r<r?rjrNrErJrvr�rVr2rBrDrIrrrrr�	s4(



�rc@sdeZdZdZdd�Zedd��Zedd��Zedd	��Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dS)�BoundArguments)r��
_signature�__weakref__cCs||_||_dSr)r�rK)r�r�r�rrrr�G
szBoundArguments.__init__cCs|jSr)rKr�rrrr�K
szBoundArguments.signaturec	Cs~g}|jj��D]d\}}|jttfkr*qvz|j|}Wntk
rRYqvYqX|jtkrj|�	|�q|�
|�qt|�Sr)rKrBrKrvrIrHr�r�rG�extendrZrm)r�r'r�rOrerrrr'O
s
zBoundArguments.argsc	Cs�i}d}|jj��D]x\}}|sD|jttfkr4d}n||jkrDd}q|sJqz|j|}Wntk
rlYqX|jtkr�|�|�q|||<q|Sr�)	rKrBrKrvrIrHr�r��update)r��kwargsZkwargs_startedr�rOrerrrrOf
s&


zBoundArguments.kwargsc	Cs�|j}g}|jj��D]x\}}z|�|||f�Wqtk
r�|jtk	rV|j}n$|jt	krfd}n|jt
krvi}nYq|�||f�YqXqt|�|_dS)Nr)r�rKrBrKrZr�rErrvrGrIr)r�r�Z
new_argumentsrNrO�valrrr�apply_defaults�
s	


zBoundArguments.apply_defaultscCs2||krdSt|t�stS|j|jko0|j|jkSrE)rrJrFr�r�rGrrrrI�
s

�zBoundArguments.__eq__cCs|d|_|d|_dS)NrKr��rKr�r=rrrr?�
s
zBoundArguments.__setstate__cCs|j|jd�S)NrRrRr�rrr�__getstate__�
szBoundArguments.__getstate__cCs@g}|j��D]\}}|�d�||��qd�|jjd�|��S)Nz{}={!r}z	<{} ({})>ri)r�rKrZr�r�r�r�)r�r'rerOrrrrB�
szBoundArguments.__repr__N)r�r�r�r�r�rjr�r'rOrQrIr?rSrBrrrrrJ4
s


rJc@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�_parametersNTr"cCs�|dkrt�}n�|r�t�}t}d}t|�D]�\}}|j}	|j}
|	|krdd}|�|j|	j�}t|��n|	|krtd}|	}|	ttfkr�|j	t
kr�|r�d}t|��nd}|
|kr�d�|
�}t|��|||
<q*ntdd�|D��}t�|�|_
||_dS)NFz7wrong parameter order: {} parameter before {} parameterz-non-default argument follows default argumentTzduplicate parameter name: {!r}css|]}|j|fVqdSrr]�rfrOrrrrhs�z%Signature.__init__.<locals>.<genexpr>)rrDrjrvrNr�r4r�rFrErr�MappingProxyTyperUrT)r�rBr@r#r�Ztop_kindZ
kind_defaults�idxrOrvrNr}rrrr��
sD��



�zSignature.__init__cCstjdtdd�t||�S)Nz_inspect.Signature.from_function() is deprecated since Python 3.5, use Signature.from_callable()r�r.)r0r1r2r&�rgr�rrr�
from_functions
�zSignature.from_functioncCstjdtdd�t||�S)Nz^inspect.Signature.from_builtin() is deprecated since Python 3.5, use Signature.from_callable()r�r.)r0r1r2r!rYrrr�from_builtins
�zSignature.from_builtin��follow_wrappedcCst|||d�S)N)r<r:)r>)rgr,r]rrrr,#s�zSignature.from_callablecCs|jSr)rUr�rrrrB)szSignature.parameterscCs|jSr�rTr�rrrr@-szSignature.return_annotation)rBr@cCs0|tkr|j��}|tkr |j}t|�||d�S)Nr)r�rBrCrTr)r�rBr@rrrrV1s
�zSignature.replacecCs8tdd�|j��D��}dd�|j��D�}|||jfS)Ncss|]}|jtkr|VqdSr)rvrHrVrrrrhAs
�z(Signature._hash_basis.<locals>.<genexpr>cSsi|]}|jtkr|j|�qSr)rvrHrNrVrrrr�Ds
�z)Signature._hash_basis.<locals>.<dictcomp>)rmrBrCr@)r�r��
kwo_paramsrrr�_hash_basis@szSignature._hash_basiscCs(|��\}}}t|���}t|||f�Sr)r`�	frozensetrCrC)r�r�r_r@rrrrDIszSignature.__hash__cCs*||krdSt|t�stS|��|��kSrE)rr?rFr`rGrrrrINs

zSignature.__eq__F�r�cCs�t�}t|j���}d}t|�}zt|�}Wn�tk
�rzt|�}	Wntk
rfYY�q�Yn�X|	jtkrzY�q�n�|	j|kr�|	jt	kr�d}
|
j
|	jd�}
t|
�d�|	f}Y�q�nP|	jtks�|	j
tk	r�|	f}Y�q�n.|r�|	f}Y�q�nd}
|
j
|	jd�}
t|
�d�Yq Xzt|�}	Wn tk
�r:td�d�Yq X|	jttfk�rVtd�d�|	jtk�r�|g}|�|�t|�||	j<�q�|	j|k�r�|	jt	k�r�tdj
|	jd��d�|||	j<q d}t�||�D]�}	|	jtk�r�|	}�q�|	jtk�r�q�|	j}
z|�|
�}WnFtk
�rN|�sJ|	jtk�rJ|	j
tk�rJtdj
|
d��d�Yn(X|	jt	k�rntdj
|	jd���|||
<�q�|�r�|dk	�r�|||j<ntdj
tt|��d���|�||�S)NrzA{arg!r} parameter is positional only, but was passed as a keyword)rez$missing a required argument: {arg!r}ztoo many positional argumentsz$multiple values for argument {arg!r}z*got an unexpected keyword argument {arg!r})rrrBrCr��
StopIterationrvrGrNrDr�r�rIrErrHrMrmr�chainr�r��_bound_arguments_cls)r�r'rOr�r�rBZ
parameters_exZarg_valsZarg_valrOr}rCZkwargs_paramr�rrr�_bindUs�




���
�������

��zSignature._bindcOs|�||�Sr�rf�r�r'rOrrr�bind�szSignature.bindcOs|j||dd�S)NTrbrgrhrrrr��szSignature.bind_partialcCs t|�t|j���fd|jifS�NrT)rrmrUrCrTr�rrrr<�s�zSignature.__reduce__cCs|d|_dSrjr^r=rrrr?�szSignature.__setstate__cCsd�|jj|�S)Nz<{} {}>rAr�rrrrB�szSignature.__repr__c	Cs�g}d}d}|j��D]d}t|�}|j}|tkr6d}n|rH|�d�d}|tkrVd}n|tkrp|rp|�d�d}|�|�q|r�|�d�d�d�	|��}|j
tk	r�t|j
�}|d�|�7}|S)NFTr�r\z({})riz -> {})
rBrCr�rvrDrZrGrHr�r�r@rrW)	r�rtZrender_pos_only_separatorZrender_kw_only_separatorrOr@rvZrenderedZannorrrr2�s0




zSignature.__str__)N)r�r�r�r�rrrJrerrAr�rrrZr[r,rjrBr@r�rVr`rDrIrfrir�r<r?rBr2rrrrr?�
s:�7



	r?r\cCstj||d�S)Nr\)r?r,)r,r]rrrr�sr�c
Cs�ddl}ddl}|��}|jddd�|jddddd	�|��}|j}|�d
�\}}}z|�|�}}	WnNtk
r�}
z0d�	|t
|
�j|
�}t|t
jd�t
�d
�W5d}
~
XYnX|r�|�d�}|	}|D]}
t||
�}q�|	jt
jk�rtdt
jd�t
�d�|j�r�td�	|��td�	t|	���td�	|	j��||	k�rxtd�	t|	j���t|	d��r�td�	|	j��n6zt|�\}}Wntk
�r�YnXtd�	|��td�ntt|��dS)Nrr
zCThe object to be analysed. It supports the 'module:qualname' syntax)�helpz-dz	--details�
store_truez9Display info about the module rather than its source code)�actionrkr�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_modulernr�rr��printr��stderr�exitr�rL�builtin_module_namesZdetailsr��
__cached__rUr�rrnr�r)ror��parserr'�targetZmod_nameZ	has_attrs�attrsr,r�rur}�parts�part�__r�rrr�_main$s`���



r�r�)N)N)N)F)N)r�)r�)r�)r�)r�)r)T)T)T)��
__author__r8�disZcollections.abcr7�enum�importlib.machineryr�rr�r�r�r�rrrr0r#r��operatorrrr�globalsZmod_dictZCOMPILER_FLAG_NAMESrKrbrcrGr
rrrrrrr rr*r-r.r/r1r3r5r:r<r>r@rBrCrQrdrerwrVr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rnr�r�rrrrrrr,r-r7r8r3rPrSrWrZr�rprsr|r~r�r�r�r�r�r��_fieldsr�r�r�r�r�r�r
r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr(Z_WrapperDescriptor�allZ_MethodWrapperr�rJZ_ClassMethodWrapperrAr�r�r�r�r�r�r�r�rr!r&r>r�r�IntEnumr.rrDrrFrrGrrHrrIr3rrJr?r�r�r�rrrr�<module>sx	




	
,
t$
>
	
.N->




�]


	�
;�
<
5

 



		0

�
LH

_�K�	k: