AlkantarClanX12

Your IP : 3.137.176.213


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/inspect.cpython-310.opt-2.pyc

o

6��f���@s�	dZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlmZddlmZmZe�Zej��D]
\ZZeede<q]dZdddd�d	d
�Zdd�Z d
d�Z!dd�Z"dd�Z#dd�Z$e%ed�r�dd�Z&ndd�Z&e%ed�r�dd�Z'ndd�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�Z4d7d8�Z5d9d:�Z6d�d;d<�Z7ed=d>�Z8d?d@�Z9dAdB�Z:ddC�dDdE�Z;dFdG�Z<dHdI�Z=dJdK�Z>dLdM�Z?dNdO�Z@dPdQ�ZAdRdS�ZBdTdU�ZCd�dVdW�ZDiZEiZFd�dXdY�ZGGdZd[�d[eH�ZIGd\d]�d]ejJ�ZKd^d_�ZLd`da�ZMGdbdc�dceH�ZNGddde�de�ZOdfdg�ZPdhdi�ZQdjdk�ZRdldm�ZSd�dndo�ZTedpdq�ZUdrds�ZVedtdu�ZWdvdw�ZXedxdy�ZYdzd{�ZZed|d}�Z[d~d�Z\d�d�d��Z]d�d��Z^dddd�iie_d�d��d�d��d�d��d�d��e]fd�d��Z`e_d�d��d�d��d�d��fd�d��Zad�d��Zbd�d��Zcd�d��Zded�d��Zed�d��Zfed�d��Zgd�d�d��Zhd�d��Zied�d�egjj�Zkd�d�d��Zld�d�d��Zmd�d��Znd�d�d��Zod�d�d��Zpeq�Zrd�d��Zsd�d��Ztd�d��Zud�d��Zvd�d��Zwerfd�d��Zxd�Zyd�Zzd�Z{d�Z|d�d��Z}d�d��Z~d�Zd�Z�d�Z�d�Z�d�dDŽZ�d�dɄZ�e�e�j��Z�e�e�j��Z�e�e�j�d��Z�e�e�e�ej�fZ�d�d̄Z�d�d�d΄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�d߄Z�d�d�dddd�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�dddd�d�d��Z�d�d��Z�e�d�k�r�e��dSdS()zKa-Ping Yee <ping@lfw.org>z'Yury Selivanov <yselivanov@sprymix.com>�N)�
attrgetter)�
namedtuple�OrderedDictZCO_iF��globals�locals�eval_strcs�	t|t�rFt|dd�}|r"t|d�r"|�dd�}t|tj�r!d}nd}d}t|dd�}|r=tj�|d�}|r=t|dd�}t	t
|��}	|}
n2t|tj�r\t|dd�}t|d�}d}	d}
nt|�rqt|dd�}t|dd�}d}	|}
nt
|�d���|dur~iSt|t	�s�t|�d���|s�iS|s�t	|�S|
dur�	t|
d	�r�|
j}
q�t|
tj�r�|
j}
q�	t|
d�r�|
j}�dur�|��dur�|	���fd
d�|��D�}|S)N�__dict__�get�__annotations__�
__module__�__globals__z% is not a module, class, or callable.z+.__annotations__ is neither a dict nor NoneT�__wrapped__cs,i|]\}}|t|t�s|nt|����qS�)�
isinstance�str�eval)�.0�key�value�rrr�./opt/alt/python310/lib64/python3.10/inspect.py�
<dictcomp>�s
��z#get_annotations.<locals>.<dictcomp>)r�type�getattr�hasattrr
�types�GetSetDescriptorType�sys�modules�dict�vars�
ModuleType�callable�	TypeError�
ValueErrorr�	functools�partial�funcr
�items)�objrrrZobj_dict�annZobj_globals�module_name�moduleZ
obj_locals�unwrapZreturn_valuerrr�get_annotationsBsn
,�



�r/cC�	t|tj�S�N)rrr"��objectrrr�ismodule��r4cC�	t|t�Sr1)rrr2rrr�isclass��
r7cCr0r1)rr�
MethodTyper2rrr�ismethod��r:cCs<	t|�s
t|�s
t|�rdSt|�}t|d�ot|d�S)NF�__get__�__set__�r7r:�
isfunctionrr�r3�tprrr�ismethoddescriptor�s

rBcCs:	t|�s
t|�s
t|�rdSt|�}t|d�pt|d�S)NFr=�
__delete__r>r@rrr�isdatadescriptor�s
rD�MemberDescriptorTypecCr0r1)rrrEr2rrr�ismemberdescriptor��rFcC�	dS�NFrr2rrrrF��rcCr0r1)rrrr2rrr�isgetsetdescriptorrGrKcCrHrIrr2rrrrKrJcCr0r1)rr�FunctionTyper2rrrr?s
r?cCsF	t|�r|j}t|�st�|�}t|�st|�sdSt|jj|@�SrI)	r:�__func__r&�_unwrap_partialr?�_signature_is_functionlike�bool�__code__�co_flags)�f�flagrrr�_has_code_flag"s�
rUcCr6r1)rUZCO_GENERATOR�r*rrr�isgeneratorfunction-�
rWcCr6r1)rUZCO_COROUTINErVrrr�iscoroutinefunction4rXrYcCr6r1)rUZCO_ASYNC_GENERATORrVrrr�isasyncgenfunction;r8rZcCr0r1)rr�AsyncGeneratorTyper2rrr�
isasyncgenC�r\cCr0r1)rr�
GeneratorTyper2rrr�isgeneratorGsr_cCr0r1)rr�
CoroutineTyper2rrr�iscoroutineXr]racCs8	t|tj�pt|tj�ot|jjt@�pt|tj	j
�Sr1)rrr`r^rP�gi_coderRZCO_ITERABLE_COROUTINE�collections�abc�	Awaitabler2rrr�isawaitable\s��rfcCr0r1)rr�
TracebackTyper2rrr�istracebackcr;rhcCr0r1)rr�	FrameTyper2rrr�isframemsrjcCr0r1)rr�CodeTyper2rrr�iscode{srlcCr0r1)rr�BuiltinFunctionTyper2rrr�	isbuiltin�r5rncCs"	t|�pt|�pt|�pt|�Sr1)rnr?r:rBr2rrr�	isroutine�s���rocCs�	t|t�sdS|jt@rdStt|�tj�sdSt|d�r dS|j�	�D]
\}}t
|dd�r2dSq%|jD]}t
|dd�D]}t
||d�}t
|dd�rPdSq>q6dS)NFT�__abstractmethods__�__isabstractmethod__r)rr�	__flags__�TPFLAGS_IS_ABSTRACT�
issubclassrd�ABCMetarr	r)r�	__bases__)r3�namer�baserrr�
isabstract�s*


�
��ryc	Cs	t|�r
|ft|�}nd}g}t�}t|�}z|jD]}|j��D]\}}t|tj	�r2|�
|�q#qWn	ty>Ynw|D]>}	z
t||	�}
|	|vrOt�Wntyl|D]}|	|jvrg|j|	}
nqYYqAYnw|rs||
�rz|�
|	|
f�|�
|	�qA|jdd�d�|S)NrcSs|dS)Nrr)Zpairrrr�<lambda>��zgetmembers.<locals>.<lambda>�r)r7�getmro�set�dirrvr	r)rr�DynamicClassAttribute�append�AttributeErrorr�add�sort)r3Z	predicate�mro�results�	processed�namesrx�k�vrrrrr�
getmembers�sL

����
�

���	r��	Attributezname kind defining_class objectcCs6	t|�}tt|��}tdd�|D��}|f|}||}t|�}|D]}|j��D]\}}t|tj�r>|j	dur>|�
|�q*q#g}	t�}
|D]�}d}d}
d}||
vr�z|dkr\td��t
||�}
Wntyt}zWYd}~nGd}~wwt
|
d|�}||vr�d}d}|D]}t
||d�}||
ur�|}q�|D]}z|�||�}Wn	ty�Yq�w||
ur�|}q�|dur�|}|D]}||jvr�|j|}||vr�|}nq�|dur�qG|
dur�|
n|}t|ttjf�r�d}|}n!t|ttjf�r�d}|}nt|t�r�d}|}n
t|��rd	}nd
}|	�
t||||��|
�|�qG|	S)Ncss �|]}|ttfvr|VqdSr1)rr3)r�clsrrr�	<genexpr>s�z'classify_class_attrs.<locals>.<genexpr>r	z)__dict__ is special, don't want the proxy�__objclass__z
static methodzclass method�property�method�data)r}r�tuplerr	r)rrr��fgetr�r~�	Exceptionr�__getattr__r��staticmethod�BuiltinMethodType�classmethod�ClassMethodDescriptorTyper�ror�r�)r�r�ZmetamroZclass_basesZ	all_basesr�rxr�r��resultr�rwZhomeclsZget_objZdict_obj�excZlast_clsZsrch_clsZsrch_objr*�kindrrr�classify_class_attrs�s�

��
�����

�

r�cC�	|jSr1)�__mro__)r�rrrr}^sr}��stopcs�	�dur
dd�}n�fdd�}|}t|�|i}t��}||�r@|j}t|�}||vs1t|�|kr8td�|���|||<||�s |S)NcSs
t|d�S�Nr�r�rSrrr�_is_wrapperu�
zunwrap.<locals>._is_wrappercst|d�o	�|�Sr�r�r�r�rrr�xsz!wrapper loop when unwrapping {!r})�idr�getrecursionlimitr�lenr%�format)r(r�r�rSZmemoZrecursion_limitZid_funcrr�rr.ds
�r.cCs	|��}t|�t|���Sr1)�
expandtabsr��lstrip)�lineZexplinerrr�
indentsize�sr�cCsNtj�|j�}|dur
dS|j�d�dd�D]}t||�}qt|�s%dS|S)N�.���)rrr
r�__qualname__�splitrr7)r(r�rwrrr�
_findclass�sr�c	Cs�t|�r'|jD]}|tur$z|j}Wn	tyYqw|dur$|SqdSt|�rI|jj}|j}t|�rEt	t	||d�d�|jurE|}n�|j
}n�t|�rb|j}t|�}|dus_t	||�|uradSnmt
|�r�|j}|j}t|�r}|jd||jkr}|}nR|j
}nNt|t�r�|j}|j}t|�}|dus�t	||�|ur�dSn1t|�s�t|�r�|j}|j}t	||�|ur�dSt|�r�t	|dd�}t|t�r�||vr�||SndS|jD]}zt	||�j}Wn	ty�Yq�w|dur�|Sq�dS)NrMr��	__slots__)r7r�r3�__doc__r�r:rM�__name__�__self__r�	__class__r?r�rnr�rr�r�rBrDr�rFr )r*rx�docrw�selfr�r(�slotsrrr�_finddoc�sx

���
��
��r�c	Csf	z|j}Wn
tyYdSw|dur(zt|�}Wnttfy'YdSwt|t�s/dSt|�Sr1)r�r�r�r$rr�cleandoc)r3r�rrr�getdoc�s
��
r�cCs�	z	|���d�}Wn
tyYdSwtj}|dd�D]}t|���}|r3t|�|}t||�}q|r>|d��|d<|tjkrWtdt|��D]}|||d�||<qJ|rg|dsg|�	�|rg|dr]|rx|dsx|�	d�|rx|drmd�
|�S)N�
�rr�)r�r��UnicodeErrorr�maxsizer�r��min�range�pop�join)r��linesZmarginr�Zcontent�indent�irrrr��s0�
�
(�
�
r�cCs�	t|�rt|dd�r|jStd�|���t|�r>t|d�r7tj�	|j
�}t|dd�r.|jS|j
dkr7td��td�|���t|�rE|j
}t|�rL|j}t|�rS|j}t|�rZ|j}t|�ra|jStd�t|�j���)N�__file__z{!r} is a built-in moduler�__main__�source code not availablez{!r} is a built-in classzVmodule, class, method, function, traceback, frame, or code object was expected, got {})r4rr�r$r�r7rrrr
r�OSErrorr:rMr?rQrh�tb_framerj�f_coderl�co_filenamerr�)r3r-rrr�getfiles8

��r�cCsV	tj�|�}dd�tj��D�}|��|D]\}}|�|�r(|d|�SqdS)NcSsg|]	}t|�|f�qSr)r�)r�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��r1tj���dtjj	d�nt�fdd�tjj
D��r@dStj���rH�St|��}t
|dd�durW�St
t
|dd�dd�dure�S�tjvrl�SdS)Nc3��|]}��|�VqdSr1�r��r�s��filenamerrr�4��z getsourcefile.<locals>.<genexpr>rc3r�r1r�r�r�rrr�7r��
__loader__�__spec__�loader)r�r�r��DEBUG_BYTECODE_SUFFIXES�OPTIMIZED_BYTECODE_SUFFIXES�anyr�r��splitext�SOURCE_SUFFIXES�EXTENSION_SUFFIXES�exists�	getmoduler�	linecache�cache)r3Zall_bytecode_suffixesr-rr�r�
getsourcefile-s,
��

�r�cCs.	|dur
t|�pt|�}tj�tj�|��Sr1)r�r�r�r��normcase�abspath)r3�	_filenamerrr�
getabsfileFsr�c
	Cs|	t|�r|St|d�rtj�|j�S|dur#|tvr#tj�t|�Szt||�}Wntt	fy6YdSw|tvrCtj�t|�Stj�
���D].\}}t|�rxt|d�rx|j}|t
�|d�krcqJ|t
|<t|�}|jt|<ttj�|�<qJ|tvr�tj�t|�Stjd}t|d�s�dSt||j�r�t||j�}||ur�|Stjd}t||j�r�t||j�}	|	|ur�|SdSdS)Nrr�r�r��builtins)r4rrrr
r�
modulesbyfiler�r$�FileNotFoundError�copyr)r��_filesbymodnamer�r�r��realpathr)
r3r��file�modnamer-rS�mainZ
mainobjectZbuiltinZ
builtinobjectrrrr�RsT
�
�
��


�r�c@�eZdZdS)�ClassFoundExceptionN�r�rr�rrrrr��rc@s(eZdZdd�Zdd�ZeZdd�ZdS)�_ClassFindercCsg|_||_dSr1)�stack�qualname)r�rrrr�__init__��
z_ClassFinder.__init__cCs<|j�|j�|j�d�|�|�|j��|j��dS)Nz<locals>)rr�rw�
generic_visitr��r��noderrr�visit_FunctionDef�s


z_ClassFinder.visit_FunctionDefcCsb|j�|j�|jd�|j�kr%|jr|jdj}n|j}|d8}t|��|�|�|j�	�dS)Nr�rr�)
rr�rwrr��decorator_list�linenorr	r�)r�r�line_numberrrr�visit_ClassDef�s
z_ClassFinder.visit_ClassDefN)r�rr�rrZvisit_AsyncFunctionDefrrrrrr�s
rc

Cs�	t|�}|r
t�|�nt|�}|�d�r|�d�std��t||�}|r.t�||j	�}nt�|�}|s9td��t
|�rA|dfSt|�r||j}d�
|�}t�|�}t|�}z
|�|�Wtd��ty{}z|jd}	||	fWYd}~Sd}~wwt|�r�|j}t|�r�|j}t|�r�|j}t|�r�|j}t|�r�t|d�s�td	��|jd
}
t� d�}|
dkr�z||
}Wnt!y�td��w|�"|�r�	||
fS|
d
}
|
dks�||
fStd
��)N�<�>r�zcould not get source coder�zcould not find class definition�co_firstlinenoz"could not find function definitionr�z>^(\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�r�r��getlinesr	r4r7r�r��ast�parser�visitr�argsr:rMr?rQrhr�rjr�rlrr�re�compile�
IndexError�match)
r3r�r-r�r�sourceZtreeZclass_finder�er�lnumZpatr�rrr�
findsource�sl



�
��


�
��r#c	Cs�	zt|�\}}WnttfyYdSwt|�r�d}|r*|ddd�dkr*d}|t|�krJ||��dvrJ|d}|t|�krJ||��dvs8|t|�kr�||dd�dkr�g}|}|t|�kr�||dd�dkr�|�||���|d}|t|�kr�||dd�dksnd�|�SdSdS|dk�rTt	||�}|d}|dk�rV||�
�dd�dk�rXt	||�|k�rZ||���
�g}|dk�r|d}||���
�}|dd�dk�rt	||�|k�r|g|dd�<|d}|dkr�n||���
�}|dd�dk�rt	||�|ks�|�r1|d��dk�r1g|dd�<|�r1|d��dk�s|�rO|d��dk�rOg|dd�<|�rO|d��dk�s=d�|�SdSdSdSdS)	Nr�z#!r�)r�#r%rr�)r#r�r$r4r��stripr�r�r�r�r�)r3r�r"�startZcomments�endr�Zcommentrrr�getcomments�s\��   �
�
	$
$
"���
�r)c@r)�
EndOfBlockNrrrrrr*�r*c@seZdZ	dd�Zdd�ZdS)�BlockFindercCs.d|_d|_d|_d|_d|_d|_d|_dS)NrFr�)r��islambda�started�passline�indecorator�last�	body_col0�r�rrrrs
zBlockFinder.__init__cCsD|js!|js!|dkrd|_n|dvr|dkrd|_d|_d|_dS|tjkr=d|_|d|_|jr3t�|jr;d|_dSdS|jrBdS|tjkr_|j	durT|jrT|d|_	|j
d|_
d|_dS|tjkrs|j
d|_
|j
dkrqt�dS|tjkr�|j	dur�|d|j	kr�|d|_dSdSdS|j
dkr�|tjtj
fvr�t�dSdS)N�@T)�def�class�lambdar7Frr�)r.r0r-r/�tokenize�NEWLINEr1r*�INDENTr2r��DEDENT�COMMENT�NL)r�r�tokenZsrowcolZerowcolr�rrr�
tokeneater"sF



�




�
��zBlockFinder.tokeneaterN)r�rr�rr?rrrrr,s	r,c	CsV	t�}zt�t|�j�}|D]}|j|�qWnttfy#Ynw|d|j�Sr1)	r,r8�generate_tokens�iter�__next__r?r*�IndentationErrorr1)r�Zblockfinder�tokensZ_tokenrrr�getblockMs��rEcCs`	t|�}t|�\}}t|�r|j}t|�s t|�r$|jjdkr$|dfSt||d��|dfS)Nz<module>rr�)	r.r#rhr�r4rjr��co_namerE�r3r�r"rrr�getsourcelinesXs�rHcCs	t|�\}}d�|�S)Nr)rHr�rGrrr�	getsourcems
rIcCsT	g}|jtdd�d�|D]}|�||jf�||vr'|�t||||��q|S)Nrr�r|)r�rr�rv�walktree)�classes�children�parentr��crrrrJws�rJcCs�	i}g}|D]2}|jr0|jD]}||vrg||<|||vr&||�|�|r.||vr.nqq||vr9|�|�q|D]}||vrG|�|�q<t||d�Sr1)rvr�rJ)rK�uniquerL�rootsrNrMrrr�getclasstree�s(
�
�
�rQ�	Argumentszargs, varargs, varkwc	Cs�	t|�std�|���|j}|j}|j}t|d|��}t||||��}d}||7}d}|jt@r=|j|}|d}d}|jt	@rI|j|}t
||||�S)Nz{!r} is not a code objectrr�)rlr$r��co_varnames�co_argcount�co_kwonlyargcount�listrR�
CO_VARARGS�CO_VARKEYWORDSrR)	�cor��nargsZnkwargsr�
kwonlyargs�step�varargs�varkwrrr�getargs�s$



r_�ArgSpeczargs varargs keywords defaultscCsF	tjdtdd�t|�\}}}}}}}|s|rtd��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(rr]r^�defaultsr[�kwonlydefaultsr+rrr�
getargspec�s��ri�FullArgSpeczGargs, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotationsc
Csh	zt|ddtdd�}Wnty}ztd�|�d}~wwg}d}d}g}g}i}d}	i}
|j|jur9|j|d<|j��D]a}|j}|j	}
|t
ur\|�|
�|j|jur[|	|jf7}	n8|t
urr|�|
�|j|jurq|	|jf7}	n"|tury|
}n|tur�|�|
�|j|jur�|j|
|
<n|tur�|
}|j|jur�|j||
<q>|
s�d}
|	s�d}	t|||||	||
|�S)NF)�follow_wrapper_chains�skip_bound_arg�sigclsrzunsupported callabler�return)�_signature_from_callable�	Signaturer�r$�return_annotation�empty�
parameters�valuesr�rw�_POSITIONAL_ONLYr��default�_POSITIONAL_OR_KEYWORD�_VAR_POSITIONAL�
_KEYWORD_ONLY�_VAR_KEYWORD�
annotationrj)r(�sig�exrr]r^�posonlyargsr[�annotationsrg�
kwdefaults�paramr�rwrrrrf�sl
�
��

�
�

�
��rf�ArgInfozargs varargs keywords localscCs"	t|j�\}}}t||||j�Sr1)r_r�r��f_locals)�framerr]r^rrr�getargvalues;sr�cCstt|dd�dkrdd�}t�d|t|��St|tj�rt|�St|t�r6|j	d|fvr.|j
S|j	d|j
St|�S)Nr�typingcSs|��}|�d�S)Nztyping.)�group�removeprefix)r�textrrr�replGs
zformatannotation.<locals>.replz[\w\.]+r�r�)rr�sub�reprrr�GenericAliasrrrr�)r{Zbase_moduler�rrr�formatannotationEs
r�cst|dd���fdd�}|S)Nrcs
t|��Sr1)r�)r{�r-rr�_formatannotationUr�z5formatannotationrelativeto.<locals>._formatannotation)r)r3r�rr�r�formatannotationrelativetoSsr�rcC�d|S�N�*r�rwrrrrz\r{rzcCr��N�**rr�rrrrz]r{cC�dt|�S�N�=�r��rrrrrz^r+cCr�)Nz -> r)r�rrrrz_r{c
s:	ddlm}
|
dtdd����fdd�}g}|r"t|�t|�}t|�D]\}}||�}|r>||kr>||
|||�}|�|�q&|durR|�|||���n|rY|�d�|rw|D]}||�}|rq||vrq||
||�7}|�|�q]|dur�|�|	||���d	d
�|�d}d�vr�||��d��7}|S)
Nr)rdzc`formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directlyr$racs(�|�}|�vr|d��|�7}|S)Nz: r)�argr��rr��	formatargrr�formatargandannotationtsz-formatargspec.<locals>.formatargandannotationr��(�, �)rn)rcrdrer��	enumerater�r�)rr]r^rgr[rhrr��
formatvarargs�formatvarkw�formatvalueZ
formatreturnsr�rdr��specsZfirstdefaultr�r��specZ	kwonlyargr�rr�r�
formatargspecYs>�
r�cCr�r�rr�rrrrz�r{cCr�r�rr�rrrrz�r{cCr�r�r�r�rrrrz�r+cCs�	|||fdd�}g}	tt|��D]}
|	�|||
��q|r,|	�||�|||��|r;|	�||�|||��dd�|	�dS)NcSs||�|||�Sr1r)rwrr�r�rrr�convert�sz formatargvalues.<locals>.convertr�r�r�)r�r�r�r�)rr]r^rr�r�r�r�r�r�r�rrr�formatargvalues�s
�r�cs��fdd�|D�}t|�}|dkr|d}n|dkr dj|�}ndj|dd��}|dd�=d	�|�|}td
|||r=dnd|dkrDd
nd|f��)Ncsg|]
}|�vrt|��qSrr�)rrw�rtrrr��sz&_missing_arguments.<locals>.<listcomp>r�rr$z	{} and {}z, {} and {}���r�z*%s() missing %i required %s argument%s: %s�
positional�keyword-onlyrr�)r�r�r�r$)�f_nameZargnames�posrtr��missingr��tailrr�r�_missing_arguments�s


��r�c
	s�t|�|}t�fdd�|D��}|r|dk}	d|f}
n|r*d}	d|t|�f}
nt|�dk}	tt|��}
d}|rOd}||dkrCd	nd||dkrKd	ndf}td
||
|	rWd	nd|||dkre|sedf��df��)
Ncsg|]}|�vr|�qSrr)rr�r�rrr��sz_too_many.<locals>.<listcomp>r�zat least %dTz
from %d to %drz7 positional argument%s (and %d keyword-only argument%s)r�z5%s() takes %s positional argument%s but %d%s %s givenZwasZwere)r�rr$)
r�rZkwonlyr]ZdefcountZgivenrtZatleastZkwonly_givenZpluralr|Z
kwonly_sig�msgrr�r�	_too_many�s0�����r�cOs�	t|�}|\}}}}}}	}
|j}i}t|�r"|jdur"|jf|}t|�}
t|�}|r0t|�nd}t|
|�}t|�D]
}|||||<q;|rRt||d��||<t||�}|r^i||<|�	�D])\}}||vr{|stt
d||f��||||<qb||vr�t
d||f��|||<qb|
|kr�|s�t||||||
|�|
|kr�|d||�}|D]
}||vr�t||d|�q�t
|||d��D]\}}||vr�||||<q�d}|D]}||vr�|	r�||	vr�|	|||<q�|d7}q�|r�t||d|�|S)Nrz*%s() got an unexpected keyword argument %rz(%s() got multiple values for argument %rTr�F)rfr�r:r�r�r�r�r�r~r)r$r�r�r�)r(r�Znamedr�rr]r^rgr[rhr+r�Z	arg2valueZnum_posZnum_argsZnum_defaults�nr�Zpossible_kwargs�kwrZreqr�r��kwargrrr�getcallargs�sn
��
����r��ClosureVarsz"nonlocals globals builtins unboundc	Cs�	t|�r|j}t|�std�|���|j}|jduri}ndd�t|j|j�D�}|j	}|�
dtj�}t
|�r;|j}i}i}t�}|jD]/}|dvrLqEz||||<WqEtytz||||<Wntyq|�|�YnwYqEwt||||�S)N�{!r} is not a Python functioncSsi|]\}}||j�qSr)�
cell_contents)r�varZcellrrrr"s��z"getclosurevars.<locals>.<dictcomp>�__builtins__)�None�True�False)r:rMr?r$r�rQ�__closure__�zip�co_freevarsr
r
r�r	r4r~�co_names�KeyErrorr�r�)	r(�codeZ
nonlocal_varsZ	global_nsZ
builtin_nsZglobal_varsZbuiltin_varsZ
unbound_namesrwrrr�getclosurevars
sD
�
����r��	Tracebackz+filename lineno function code_context indexr�cCs�	t|�r|j}|j}n|j}t|�std�|���t|�p!t|�}|dkr_|d|d}zt	|�\}}Wn
t
yCd}}Yn wtdt|t
|�|��}||||�}|d|}nd}}t|||jj||�S)Nz'{!r} is not a frame or traceback objectrr�r$)rh�	tb_linenor��f_linenorjr$r�r�r�r#r��maxr�r�r�r�rF)r��contextrr�r'r�r"�indexrrr�getframeinfoDs(�r�cCr�r1)r��r�rrr�	getlinenodsr��	FrameInfor�cCs6	g}|r|ft||�}|�t|��|j}|s|Sr1)r�r�r��f_back)r�r��	framelist�	frameinforrr�getouterframesks�r�cCs8	g}|r|jft||�}|�t|��|j}|s|Sr1)r�r�r�r��tb_next)�tbr�r�r�rrr�getinnerframesws�r�cCs	ttd�rt�d�SdS)N�	_getframer�)rrr�rrrr�currentframe�sr�cCs	tt�d�|�S)Nr�)r�rr��r�rrrr�srcCs	tt��d|�S)Nr$)r�r�exc_infor�rrr�trace�sr�cCstjd�|�S)Nr�)rr	r<)�klassrrr�_static_getmro��r�cCs6i}zt�|d�}Wn	tyYnwt�||t�S�Nr	)r3�__getattribute__r�r r
�	_sentinel)r*�attrZ
instance_dictrrr�_check_instance�s�r�c	CsFt|�D]}tt|��tur z|j|WStyYqwqtSr1)r��_shadowed_dictrr�r	r�)r�r��entryrrr�_check_class�s��r�cCs$zt|�WdStyYdSw�NFT)r�r$rVrrr�_is_type�s
��r�c	Csltjd}t|�D]*}z	|�|�d}Wn	tyYq	wt|�tjur/|jdkr/|j|us3|Sq	t	Sr�)
rr	r�r<r�rrr�r�r�)r��	dict_attrr�Z
class_dictrrrr��s
�

�r�c	Cs	t}t|�s t|�}t|�}|tust|�tjurt||�}n|}t||�}|turC|turCtt|�d�turCtt|�d�turC|S|turI|S|turO|S||urvtt|��D]}tt|��turuz|j	|WSt
ytYqYwqY|tur||St|��)Nr<r=)r�r�rr�rrEr�r�r�r	r�r�)r*r�rvZinstance_resultr�r�Zklass_resultr�rrr�getattr_static�s>

�
��r��GEN_CREATED�GEN_RUNNING�
GEN_SUSPENDED�
GEN_CLOSEDcC�.	|jrtS|jdur
tS|jjdkrtStS�Nr�)�
gi_runningr��gi_framer��f_lastir�r�)�	generatorrrr�getgeneratorstate��
r�cCs8	t|�std�|���t|dd�}|dur|jjSiS)Nz{!r} is not a Python generatorr�)r_r$r�rr�r�)r�r�rrr�getgeneratorlocalssr��CORO_CREATED�CORO_RUNNING�CORO_SUSPENDED�CORO_CLOSEDcCr�r�)�
cr_runningr��cr_framerr�r�r�)�	coroutinerrr�getcoroutinestater�rcCs 	t|dd�}|dur|jSiS)Nr)rr�)rr�rrr�getcoroutinelocals/s
r�
from_bytescCs8	zt||�}Wn
tyYdSwt|t�s|SdSr1)rr�r�_NonUserDefinedCallables)r�Zmethod_nameZmethrrr�"_signature_get_user_defined_methodKs�
�rc
Cs�	|j}t|���}|jpd}|jpi}|r||}z
|j|i|��}Wnty:}z
d�|�}	t|	�|�d}~wwd}
|��D]y\}}z|j	|}
Wn	t
yUYn4w|jtura|�
|�qA|jtur|||vrud}
|j|
d�||<n|�
|j�qA|jtur�|j|
d�||<|
r�|jtur�||jtd�}|||<|�|�qA|jttfvr�|�|�qA|jtur�|�
|j�qA|j|��d�S)Nrz+partial object {!r} has incorrect argumentsFT)rv�r��rs)rsrr)r�keywords�bind_partialr$r�r%�	argumentsr�r�rur�rw�replacerwry�move_to_endrzrxrt)�wrapped_sigr'Z
extra_argsZ
old_params�
new_paramsZpartial_argsZpartial_keywordsZbar}r�Ztransform_to_kwonly�
param_namer�Z	arg_valueZ	new_paramrrr�_signature_get_partial[sV



���






�rcCsn	t|j���}|r|djttfvrtd��|dj}|ttfvr)|dd�}n|t	ur1td��|j
|d�S)Nrzinvalid method signaturer�zinvalid argument typer
)r�rsrtr�rzryr%rwrurxr)r|�paramsr�rrr�_signature_bound_method�s
rcCs(	t|�pt|�pt|t�p|ttfvSr1)rnrBrrrr3rVrrr�_signature_is_builtin�s��
�rcCs�	t|�r	t|�rdSt|dd�}t|dd�}t|dt�}t|dt�}t|dd�}t|tj�oNt|t�oN|dup<t|t�oN|dupEt|t	�oNt|t	�pN|duS)NFr�rQ�__defaults__�__kwdefaults__r)
r#r7r�_voidrrrkrr�r )r*rwr�rgr�rrrrrO�s"����rOcCs>	|�d�}|dkr|�d�}|�d�}|�d�}|d|�S)N�,r�r��:r�r$)�find)r�r�Zcposrrr�_signature_get_bound_param�s
	


rcCs"	|s|ddfSd}d}dd�|�d�D�}t|�j}t�|�}d}d}g}|j}	d}
tj}tj}t|�}
|D]O}
|
j	|
j
}}||kr_|dkrT|rMd}nd}|
d7}
q7|d	kr_d}|
d}q7||krj|d
krj|
}q7|rzd}||krv|dksz|	d�|	|�|dkr�|	d
�q7d�|�}|||fS)NcSsg|]	}|r|�d��qS)�ascii)�encode)r�lrrrr�sz6_signature_strip_non_python_syntax.<locals>.<listcomp>r�FrrTr��/�$r�r�� r)r�rArBr8r�r>�OP�
ERRORTOKEN�nextr�stringr�)�	signature�self_parameter�last_positional_onlyr�r�Ztoken_streamZ
delayed_commaZskip_next_commar�r�Zcurrent_parameterr$r%�trr'�clean_signaturerrr�"_signature_strip_non_python_syntax�sT


�

r-Tc	sN	ddl�|j�t|�\}}}d|d}z��|�}Wnty'd}Ynwt|�j�s5td�����|j	d}	g��j
�d}i�t�dd�}
|
rWtj
�|
d�}|rW|j�tj
���	�fdd�����	fdd	��
G��
fd
d�d�j���f��������fdd
�	}t|	jj�}t|	jj�}
tj||
dd�}|dur��j�n�j�ttt|���D]\}\}}|||�||kr��j�q�|	jjr͈j�||	jj���j�t|	jj|	jj �D]	\}}|||�q�|	jj!r�j"�||	jj!��|du�r t�dd�}|du}t#|�}|�r|�s
|�r��$d�n
�dj%�jd�}|�d<|�|j
d�S)Nrzdef fooz: pass�"{!r} builtin has invalid signaturercs|jdur	td��|jS)Nz'Annotations are not currently supported)r{r%r�)r�rrr�
parse_namejs
z&_signature_fromstr.<locals>.parse_namecslzt|��}Wnty!zt|��}Wn	tyt�wYnwt|tttttt	d�f�r4��
|�St�r1)r�	NameErrorr%rr�int�float�bytesrPr�Constant)r�r)r�module_dict�sys_module_dictrr�
wrap_valueps���
z&_signature_fromstr.<locals>.wrap_valuecs4eZdZ��fdd�Z��fdd�Z�fdd�ZdS)z,_signature_fromstr.<locals>.RewriteSymbolicscsdg}|}t|�j�r|�|j�|j}t|�j�s
t|�j�s!t�|�|j�d�t	|��}�|�S)Nr�)
rr�r�r�r�Namer%r�r��reversed)r�r�ar�r�rr8rr�visit_Attribute~s�z<_signature_fromstr.<locals>.RewriteSymbolics.visit_Attributecst|j�j�s
t���|j�Sr1)r�ctxZLoadr%r�r
r<rr�
visit_Name�s
z7_signature_fromstr.<locals>.RewriteSymbolics.visit_Namecs�|�|j�}|�|j�}t|�j�rt|�j�st�t|j�j�r*��|j|j�St|j�j	�r:��|j|j�St|j�j
�rJ��|j|jB�St�r1)r�left�rightrr5r%�opZAddrZSubZBitOr)r�rr@rAr/rr�visit_BinOp�sz8_signature_fromstr.<locals>.RewriteSymbolics.visit_BinOpN)r�rr�r=r?rCrr<rr�RewriteSymbolics}srDcsh�|�}|r'|tur'z
���|�}��|�}Wnty&td����d�w���|�|�d��dS)Nr.�rvr{)�_emptyrZliteral_evalr%r�r�)Z	name_nodeZdefault_nodervrw)�	ParameterrDrrrr�r*rsr0rr�p�s�z_signature_fromstr.<locals>.p)�	fillvaluer�r	�rq)&r�_parameter_clsr-r�SyntaxErrorrZModuler%r��bodyrrrrrr
r	r�ZNodeTransformerr:rrg�	itertools�zip_longest�POSITIONAL_ONLY�POSITIONAL_OR_KEYWORDr�rV�vararg�VAR_POSITIONAL�KEYWORD_ONLYr�r[�kw_defaultsr��VAR_KEYWORDr4r�r)r�r*r�rlr,r)r*Zprogramr-rSr,rHrrgrAr�rwrvZ_selfZself_isboundZ
self_ismoduler)rGrDrrrr�r6r*rsr0r7r8r�_signature_fromstrEsr��


!
�
rWcCsD	t|�std�|���t|dd�}|std�|���t||||�S)Nz%{!r} is not a Python builtin function�__text_signature__z#no signature found for builtin {!r})rr$r�rr%rW)r�r(rlr�rrr�_signature_from_builtin�s�rYc	CsH	d}t|�st|�rd}ntd�|���t|dd�}|r$t||||�S|j}|j}	|	j}
|	j	}|	j
}|d|
�}
|	j}||
|
|�}t||||d�}|j
}|j}|rYt|�}nd}g}|
|}|}|
d|�D]}|rotnt}|�|t�}|�||||d��|r�|d8}qit|
|d��D]#\}}|r�tnt}|�|t�}|�||||||d	��|r�|d8}q�|	jt@r�||
|}|�|t�}|�|||td��|D]}t}|dur�|�|t�}|�|t�}|�|||t|d	��q�|	jt@�r|
|}|	jt@�r|d7}||}|�|t�}|�|||td��|||�d
t�|d�S)NFTr�rXrr)r{r�r�)r{r�rvrn�rq�__validate_parameters__)r?rOr$r�rrWrKrQrTrS�co_posonlyargcountrUr/rrr�rurwr
rFr�r�rRrWrxryrXrz)r�r(rlrrrZis_duck_functionr�rGZ	func_codeZ	pos_countZ	arg_namesZ
posonly_countr�Zkeyword_only_countZkeyword_onlyrrgr�Zpos_default_countrsZnon_default_countZposonly_leftrwr�r{�offsetrvr�rrr�_signature_from_function�s�

��
��

�

�
�
�r^)rkrlrrrc
Cs~	tjt||||||d�}t|�std�|���t|tj�r+||j	�}|r)t
|�S|S|r?t|dd�d�}t|tj�r?||�Sz|j}Wn	t
yMYnw|dur`t|t�s^td�|���|Sz|j}	Wn	t
ynYn5wt|	tj�r�||	j�}
t|
|	d�}t|
j���d}|jtjur�|St|j���}|f|}
|j|
d	�St|�s�t|�r�t||||||d
�St|�r�t|||d�St|tj�r�||j�}
t|
|�Sd}t|t��rjt t|�d�}|dur�||�}n5d}t |d
�}t |d�}d
|j!vr�|}nd|j!v�r|}n|du�r
|}n|du�r|}|du�r||�}|du�ri|j"dd�D]}z|j#}Wnt
�y;Y�q)w|�rGt$|||�S�q)t|j"v�ri|j%t&j%u�rb|j't&j'u�rb|�(t&�St)d�|���n0t|t*��s�t t|�d�}|du�r�z||�}Wnt)�y�}z
d�|�}t)|�|�d}~ww|du�r�|�r�t
|�S|St|tj+��r�d�|�}t)|��t)d�|���)N)rkrlrrrmrz{!r} is not a callable objectcSst|d�p
t|tj�S)N�
__signature__)rrrr9r�rrrrzl	s
z*_signature_from_callable.<locals>.<lambda>r�z1unexpected object {!r} in __signature__ attributer1rr
)rlrrr)rl�__call__�__new__rr�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'ror#r$r�rrr9rMrr.r_r�rp�_partialmethod�
partialmethodr(rr�rsrtr�rGrSrr?rOr^rrYrrr	r�rXrWrr3ra�
from_callabler%rrm)r*rkrlrrrrmZ_get_signature_ofr|rcrZfirst_wrapped_paramZ
sig_paramsrZcallZfactory_method�newZinitrxZtext_sigr}r�rrrroG	s��

�
�
�

��










��
��


��

roc@r)rNrrrrrr
rrc@r)rFNrrrrrrF
rrFc@s4eZdZdZdZdZdZdZdd�Ze	dd	��Z
d
S)�_ParameterKindrr�r$��cC�|jSr1)�_name_r3rrr�__str__
sz_ParameterKind.__str__cCst|Sr1)�_PARAM_NAME_MAPPINGr3rrr�description
sz_ParameterKind.descriptionN)r�rr�rPrQrSrTrVrkr�rmrrrrrf
srfzpositional-onlyzpositional or keywordzvariadic positionalr�zvariadic keywordc@s�eZdZ	dZeZeZeZ	e
ZeZ
eZeed�dd�Zdd�Zdd�Zed	d
��Zedd��Zed
d��Zedd��Zeeeed�dd�Zdd�Zdd�Zdd�Zdd�ZdS)rG)�_name�_kind�_default�_annotationrEcCszt|�|_Wntytd|�d���w|tur/|jttfvr/d}|�|jj�}t|��||_||_	|tur=td��t
|t�sNd�t|�j
�}t|��|ddkrz|dd���rz|jtkrnd	}|�|jj�}t|��t|_d
�|dd��}|��s�td�|���||_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)rfror%rFrxrzr�rmrprqrrrr�r$�isdigitrwru�isidentifierrn)r�rwr�rvr{r�rrrrM
s8�

�
zParameter.__init__cCs t|�|j|jf|j|jd�fS)N�rprq)rrnrorprqr3rrr�
__reduce__u
s
��zParameter.__reduce__cC�|d|_|d|_dS)Nrprqrt�r��staterrr�__setstate__{
�
zParameter.__setstate__cCrir1)rnr3rrrrw
�zParameter.namecCrir1)rpr3rrrrv�
r{zParameter.defaultcCrir1)rqr3rrrr{�
r{zParameter.annotationcCrir1)ror3rrrr��
r{zParameter.kind)rwr�r{rvcCsN	|tur|j}|tur|j}|tur|j}|tur|j}t|�||||d�S)NrE)rrnrorqrpr)r�rwr�r{rvrrrr�
szParameter.replacecCs�|j}|j}|jturd�|t|j��}|jtur1|jtur(d�|t|j��}n	d�|t|j��}|tkr;d|}|S|t	krCd|}|S)Nz{}: {}z{} = {}z{}={}r�r�)
r�rnrqrFr�r�rpr�rxrz)r�r��	formattedrrrrk�
s 
�

�zParameter.__str__cC�d�|jj|�S)Nz	<{} "{}">�r�r�r�r3rrr�__repr__�
r�zParameter.__repr__cCst|j|j|j|jf�Sr1)�hashrwr�r{rvr3rrr�__hash__�
szParameter.__hash__cCsJ||urdSt|t�s
tS|j|jko$|j|jko$|j|jko$|j|jkS�NT)rrG�NotImplementedrnrorprq�r��otherrrr�__eq__�
s

�
�
�zParameter.__eq__N)r�rr�r�rurPrwrQrxrSryrTrzrVrFrrrruryr�rwrvr{r�rrrkrr�r�rrrrrG-
s6(



�rGc@sfeZdZ	dZdd�Zedd��Zedd��Zedd	��Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dS)�BoundArguments)r
�
_signature�__weakref__cCs||_||_dSr1)r
r�)r�r(r
rrrr�
rzBoundArguments.__init__cCrir1)r�r3rrrr(�
r{zBoundArguments.signaturec	Cs�g}|jj��D]5\}}|jttfvrt|�Sz|j|}Wn
ty,Yt|�Sw|jtkr8|�	|�q|�
|�qt|�Sr1)r�rsr)r�rzryr
r�rx�extendr�r�)r�rrr�r�rrrr�
s�	�
zBoundArguments.argsc	Cs�i}d}|jj��D];\}}|s"|jttfvrd}n||jvr"d}q
|s%q
z|j|}Wn	ty5Yq
w|jtkrA|�|�q
|||<q
|Sr�)	r�rsr)r�rzryr
r��update)r��kwargsZkwargs_startedrr�r�rrrr��
s(
�

zBoundArguments.kwargsc	Cs�	|j}g}|jj��D]:\}}z|�|||f�WqtyF|jtur+|j}n|jt	ur3d}n
|jt
ur;i}nYq|�||f�Yqwt|�|_dS)Nr)r
r�rsr)r�r�rvrFr�rxrzr )r�r
Z
new_argumentsrwr��valrrr�apply_defaultss"


�zBoundArguments.apply_defaultscCs2||urdSt|t�s
tS|j|jko|j|jkSr�)rr�r�r(r
r�rrrr�4s

�zBoundArguments.__eq__cCrv)Nr�r
�r�r
rwrrrry<rzzBoundArguments.__setstate__cCs|j|jd�S)Nr�r�r3rrr�__getstate__@�zBoundArguments.__getstate__cCs@g}|j��D]
\}}|�d�||��qd�|jjd�|��S)Nz{}={!r}z	<{} ({})>r�)r
r)r�r�r�r�r�)r�rr�rrrrrCszBoundArguments.__repr__N)r�rr�r�rr�r(rr�r�r�ryr�rrrrrr��
s


r�c@s�eZdZ	dZeZeZeZ	d+edd�dd�Z
edd��Zed	d
��Z
eddddd�d
d��Zedd��Zedd��Zeed�dd�Zdd�Zdd�Zdd�Zdd�dd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�ZdS),rp)�_return_annotation�_parametersNTrZcCs�	|dur	t�}n_|r_t�}t}d}|D]I}|j}|j}	||kr.d}
|
�|j|j�}
t|
��||kr6d}|}|ttfvrL|jt	urJ|rId}
t|
��nd}|	|vrYd�|	�}
t|
��|||	<qn	tdd�|D��}t
�|�|_||_
dS)NFz7wrong parameter order: {} parameter before {} parameterz-non-default argument follows default argumentTzduplicate parameter name: {!r}css�|]}|j|fVqdSr1r��rr�rrrr��r�z%Signature.__init__.<locals>.<genexpr>)rrur�rwr�rmr%rwrvrFr�MappingProxyTyper�r�)r�rsrqr[rZtop_kindZ
kind_defaultsr�r�rwr�rrrrhsF��
�	

�#
zSignature.__init__cC�	tjdtdd�t||�S)Nz_inspect.Signature.from_function() is deprecated since Python 3.5, use Signature.from_callable()r$ra)rcrdrer^�r�r(rrr�
from_function��
�
zSignature.from_functioncCr�)Nz^inspect.Signature.from_builtin() is deprecated since Python 3.5, use Signature.from_callable()r$ra)rcrdrerYr�rrr�from_builtin�r�zSignature.from_builtinF��follow_wrappedrrrcCs	t||||||d�S)N)rmrkrrr)ro)r�r*r�rrrrrrrd�s
�zSignature.from_callablecCrir1)r�r3rrrrs�r{zSignature.parameterscCrir1�r�r3rrrrq�r{zSignature.return_annotation)rsrqcCs2	|tur
|j��}|tur|j}t|�||d�S)NrJ)rrsrtr�r)r�rsrqrrrr�s
�zSignature.replacecCs8tdd�|j��D��}dd�|j��D�}|||jfS)Ncss�|]
}|jtkr|VqdSr1)r�ryr�rrrr��s�
��z(Signature._hash_basis.<locals>.<genexpr>cSsi|]}|jtkr|j|�qSr)r�ryrwr�rrrr�s
�z)Signature._hash_basis.<locals>.<dictcomp>)r�rsrtrq)r�r�
kwo_paramsrrr�_hash_basis�szSignature._hash_basiscCs(|��\}}}t|���}t|||f�Sr1)r��	frozensetrtr�)r�rr�rqrrrr��szSignature.__hash__cCs*||urdSt|t�s
tS|��|��kSr�)rrpr�r�r�rrrr��s

zSignature.__eq__�r'cCs~	i}t|j���}d}t|�}	zt|�}Wn`tywzt|�}	Wn
ty.YYn�w|	jtkr6Yn�|	j|vrS|	jtkrNd}
|
j	|	jd�}
t
|
�d�|	f}Yns|	jtks]|	jt
urb|	f}Ynd|ri|	f}Yn]d}
|
j	|	jd�}
t
|
�d�wzt|�}	Wnty�t
d�d�w|	jttfvr�t
d�d�|	jtkr�|g}|�|�t|�||	j<n|	j|vr�|	jtkr�t
dj	|	jd��d�|||	j<qd}t�||�D]P}	|	jtkr�|	}q�|	jtkr�q�|	j}
z|�|
�}Wn"t�y
|�s|	jtk�r|	jt
u�rt
dj	|
d��d�Yq�w|	jtk�rt
dj	|	jd���|||
<q�|�r9|du�r-|||j<nt
dj	tt|��d���|�||�S)	NrTzA{arg!r} parameter is positional only, but was passed as a keyword)r�z$missing a required argument: {arg!r}ztoo many positional argumentsz$multiple values for argument {arg!r}z*got an unexpected keyword argument {arg!r})rArsrtr&�
StopIterationr�rxrwrur�r$rzrvrFryr�r�rN�chainr�r��_bound_arguments_cls)r�rr�r'r
rsZ
parameters_exZarg_valsZarg_valr�r�rtZkwargs_paramrrrr�_bind�s��






�(
���

���
�J

�����


��zSignature._bindcOs	|�||�Sr1�r��r�rr�rrr�bindmrGzSignature.bindcOs	|j||dd�S)NTr�r�r�rrrrtszSignature.bind_partialcCs t|�t|j���fd|jifS�Nr�)rr�r�rtr�r3rrrru{s�zSignature.__reduce__cCs|d|_dSr�r�rwrrrry�r�zSignature.__setstate__cCr})Nz<{} {}>r~r3rrrr�r�zSignature.__repr__c	Cs�g}d}d}|j��D]2}t|�}|j}|tkrd}n	|r$|�d�d}|tkr+d}n
|tkr8|r8|�d�d}|�|�q|rE|�d�d�d�	|��}|j
tur^t|j
�}|d�|�7}|S)NFTr!r�z({})r�z -> {})
rsrtrr�rur�rxryr�r�rqrFr�)	r�r�Zrender_pos_only_separatorZrender_kw_only_separatorr�r|r�ZrenderedZannorrrrk�s0




zSignature.__str__r1)r�rr�r�rGrKr�r�rFrrrr�r�r�rdr�rsrqrrr�r�r�r�r�rruryrrkrrrrrpJs@�6

�

	rpr�cCs	tj|||||d�S)Nr�)rprd)r*r�rrrrrrr(�s�r(c
Cs�	ddl}ddl}|��}|jddd�|jddddd	�|��}|j}|�d
�\}}}z	|�|�}}	Wn(ty]}
zd�	|t
|
�j|
�}t|t
jd�t
�d
�WYd}
~
nd}
~
ww|rq|�d�}|	}|D]}
t||
�}qi|	jt
jvr�tdt
jd�t
�d�|jr�td�	|��td�	t|	���td�	|	j��||	ur�td�	t|	j���t|	d�r�td�	|	j��nzt|�\}}Wn	ty�Ynwtd�	|��td�dStt|��dS)Nrr3zCThe 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�rzFailed 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_argsr3�	partition�
import_moduler�r�rr��printr�stderr�exitr�r�builtin_module_namesZdetailsr��
__cached__r�r�rr�r#rI)r�r��parserr�targetZmod_nameZ	has_attrsZattrsr*r-r�r��parts�part�__rrrr�_main�sf�����


��r�r�r1)F)r�)r)T)TNNF)��
__author__rdr�disZcollections.abcrc�enum�importlib.machineryr�rNr�r�rrr8r>rrcr&r��operatorrrrrZmod_dictZCOMPILER_FLAG_NAMESr)r�r�rsr/r4r7r:rBrDrrFrKr?rUrWrYrZr\r_rarfrhrjrlrnroryr�r�r�r}r.r�r�r�r�r�r�r�r�r�r�r�r�r�rZNodeVisitorrr#r)r*r,rErHrIrJrQrRr_r`rirjrfr�r�r�r�rr�r�r�r�r�r�r�r�r�r��_fieldsr�r�r�r�rr�r3r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr`Z_WrapperDescriptor�allZ_MethodWrapperr2r	Z_ClassMethodWrapperrmrrrrrrOrr-rWrYr^rorrF�IntEnumrfrPrurQrwrSrxrTryrVrzrlrGr�rpr(r�r�rrrr�<module>s� t	






	

,t$
>
	
/D-6




�
]


�;
�
<
5
 



		0

�
L
H

�`�B�	l
:
�