AlkantarClanX12

Your IP : 18.221.93.167


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/inspect.cpython-312.opt-2.pyc

�

�Q�ft�����	dZgd�ZddlZddlZddlZddlZddlZddlZ	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlmZddlmZddlmZmZddlmZe�Zej>jA�D]
\Z!Z"e!ede"z<�[!["[d	Z#ddd
d�d�Z$d
�Z%d�Z&d�Z'd�Z(d�Z)e*ed�rd�Z+nd�Z+e*ed�rd�Z,nd�Z,d�Z-d�Z.d�Z/e0�Z1d�Z2d�Z3d�Z4d�Z5d�Z6d �Z7d!�Z8d"�Z9d#�Z:d$�Z;d%�Z<d&�Z=d'�Z>d(�Z?d)�Z@d*�ZAd�d+�ZBd�d,�ZCed-d.�ZDd/�ZEd0�ZFdd1�d2�ZGd3�ZHd4�ZId5�ZJd6�ZKd7�ZLd8�ZMd9�ZNd:�ZOd�d;�ZPiZQiZRd�d<�ZSGd=�d>eT�ZUGd?�d@ej��ZWdA�ZXdB�ZYGdC�dDeT�ZZGdE�dF�Z[dG�Z\dH�Z]dI�Z^dJ�Z_d�dK�Z`edLdM�ZadN�ZbedOdP�ZcdQ�ZdedRdS�ZedT�Zfd�dU�ZgdV�ZheidW�dX�dY�fdZ�Zjd[�Zkd\�Zld]�Zmed^d_�Znd`�Zoedadb�ZpGdc�ddep�Zqde�Zrdf�Zsd�dg�Ztdh�Zuedidjeqj�z�ZwGdk�dlew�Zxd�dm�Zyd�dn�Zzdo�Z{d�dp�Z|d�dq�Z}e0�Z~e�jdr�jZ�e�jds�jZ�dt�Z�du�Z�e�j�dv��Z�dw�Z�e~fdx�Z�dyZ�dzZ�d{Z�d|Z�d}�Z�d~�Z�dZ�d�Z�d�Z�d�Z�d��Z�d��Z�d�Z�d�Z�d�Z�d�Z�d��Z�d��Z�e�j8e�j:e�j<e�j>fZ�d��Z�d�d��Z�d��Z�d��Z�d��Z�d��Z�d�d��Z�d�d��Z�		d�d��Z�d��Z�d�d�ddd
d��d��Z�Gd��d��Z�Gd��d��Z�Gd��d�e�j\�Z�e��j`Z�e��jdZ�e��jhZ�e��jlZ�e��jpZ�Gd��d��Z�Gd��d��Z�Gd��d��Z�d�ddd
d��d��Z�Gd��d�e�j|�Z�d��Z�e�d�k(re��yy)�)zKa-Ping Yee <ping@lfw.org>z'Yury Selivanov <yselivanov@sprymix.com>)h�AGEN_CLOSED�AGEN_CREATED�AGEN_RUNNING�AGEN_SUSPENDED�ArgInfo�	Arguments�	Attribute�BlockFinder�BoundArguments�BufferFlags�CORO_CLOSED�CORO_CREATED�CORO_RUNNING�CORO_SUSPENDED�CO_ASYNC_GENERATOR�CO_COROUTINE�CO_GENERATOR�CO_ITERABLE_COROUTINE�	CO_NESTED�CO_NEWLOCALS�	CO_NOFREE�CO_OPTIMIZED�
CO_VARARGS�CO_VARKEYWORDS�ClassFoundException�ClosureVars�
EndOfBlock�	FrameInfo�FullArgSpec�
GEN_CLOSED�GEN_CREATED�GEN_RUNNING�
GEN_SUSPENDED�	Parameter�	Signature�TPFLAGS_IS_ABSTRACT�	Traceback�classify_class_attrs�cleandoc�currentframe�
findsource�formatannotation�formatannotationrelativeto�formatargvalues�get_annotations�
getabsfile�getargs�getargvalues�getasyncgenlocals�getasyncgenstate�getattr_static�getblock�getcallargs�getclasstree�getclosurevars�getcomments�getcoroutinelocals�getcoroutinestate�getdoc�getfile�getframeinfo�getfullargspec�getgeneratorlocals�getgeneratorstate�getinnerframes�	getlineno�
getmembers�getmembers_static�	getmodule�
getmodulename�getmro�getouterframes�	getsource�
getsourcefile�getsourcelines�
indentsize�
isabstract�
isasyncgen�isasyncgenfunction�isawaitable�	isbuiltin�isclass�iscode�iscoroutine�iscoroutinefunction�isdatadescriptor�isframe�
isfunction�isgenerator�isgeneratorfunction�isgetsetdescriptor�ismemberdescriptor�ismethod�ismethoddescriptor�ismethodwrapper�ismodule�	isroutine�istraceback�markcoroutinefunction�	signature�stack�trace�unwrap�walktree�N)�	iskeyword)�
attrgetter)�
namedtuple�OrderedDict)�ref�CO_iF��globals�locals�eval_strc
�t�	t|t�r�t|dd�}|r;t|d�r/|j	dd�}t|t
j�rd}nd}d}t|dd�}|r/tjj	|d�}|r
t|dd�}tt|��}	|}
npt|t
j�rt|dd�}t|d�}d}	d}
n8t|�rt|dd�}t|dd�}d}	|}
nt|�d���|�iSt|t�st|�d���|siS|st|�S|
�Z	t|
d�r
|
j}
�t|
t j"�r
|
j$}
�A	t|
d�r|
j&}|�|}|�|	xsi}t|d	d
�x}r|D�cic]}|j(|��c}|z}|j+�D�
�cic]%\}
}|
t|t,�s|nt/|||���'}}
}|Scc}wcc}}
w)N�__dict__�get�__annotations__�
__module__�__globals__z% is not a module, class, or callable.z+.__annotations__ is neither a dict nor None�__wrapped__�__type_params__�)�
isinstance�type�getattr�hasattrrw�types�GetSetDescriptorType�sys�modules�dict�vars�
ModuleType�callable�	TypeError�
ValueErrorr{�	functools�partial�funcrz�__name__�items�str�eval)�objrrrsrt�obj_dict�ann�obj_globals�module_name�module�
obj_localsrh�type_params�param�key�value�return_values                �./opt/alt/python312/lib64/python3.12/inspect.pyr.r.�s]��+�X�#�t���3�
�D�1�����%�0��,�,�0�$�7�C��#�u�9�9�:����C����c�<��6����[�[�_�_�[�$�7�F��%�f�j�$�?���$�s�)�_�
���	�C��)�)�	*��c�,�d�3���c�:�.���
���	�#���c�,�d�3���c�=�$�7���
����3�'�!F�G�H�H�
�{��	��c�4� ��C�7�"M�N�O�O���	���C�y��
����v�}�-��+�+����&�)�"3�"3�4��������6�=�)� �,�,�K�����
�~��!�r��
�c�#4�b�9�9�{�9�5@�A�[�E�%�.�.�%�'�[�A�F�J���)�)�+�(�%�J�C�����s�+���e�W�f�1M�N�%��(����B��(s�H/�*H4c�8�	t|tj�S�N)r~r�r���objects r�rara*s��0��f�e�.�.�/�/�c�$�	t|t�Sr�)r~rr�s r�rSrS.s��/��f�d�#�#r�c�8�	t|tj�Sr�)r~r��
MethodTyper�s r�r^r^2s��:��f�e�.�.�/�/r�c��	t|�st|�st|�ryt|�}t	|d�xr
t	|d�S)NF�__get__�__set__�rSr^rYrr��r��tps  r�r_r_6sG��B��v��(�6�*�j��.@��	
�f��B��2�y�!�@�'�"�i�*@�&@�@r�c��	t|�st|�st|�ryt|�}t	|d�xst	|d�S)NFr��
__delete__r�r�s  r�rWrWJsC����v��(�6�*�j��.@��	
�f��B��2�y�!�>�W�R��%>�>r��MemberDescriptorTypec�8�	t|tj�Sr�)r~r�r�r�s r�r]r]Z���	��&�%�"<�"<�=�=r�c��	y�NFr}r�s r�r]r]b���	�r�r�c�8�	t|tj�Sr�)r~r�r�r�s r�r\r\kr�r�c��	yr�r}r�s r�r\r\sr�r�c�8�	t|tj�Sr�)r~r��FunctionTyper�s r�rYrYzs��	I��f�e�0�0�1�1r�c���	t|�r|j}t|�r�tj|�}t	|�st|�syt
|jj|z�Sr�)	r^�__func__r��_unwrap_partialrY�_signature_is_functionlike�bool�__code__�co_flags)�f�flags  r��_has_code_flagr��s^����1�+�
�J�J���1�+��!�!�!�$�A��q�M�7��:����
�
�#�#�d�*�+�+r�c�$�	t|t�Sr�)r�r�r�s r�r[r[�s��6��#�|�,�,r�c��t|�r|j}t|�r�tj|�}t	|dd�t
uS)N�_is_coroutine_marker)r^r�r�r�r��_is_coroutine_mark�r�s r��_has_coroutine_markr��sA��
�1�+�
�J�J���1�+��!�!�!�$�A��1�,�d�3�7I�I�Ir�c�N�	t|d�r|j}t|_|S)Nr�)r�r�r�r�)r�s r�rdrd�s)����t�Z� ��}�}�� 2�D���Kr�c�>�	t|t�xst|�Sr�)r�rr�r�s r�rVrV�s!���
�#�|�,�H�0C�C�0H�Hr�c�$�	t|t�Sr�)r�rr�s r�rPrP�s���
�#�1�2�2r�c�8�	t|tj�Sr�)r~r��AsyncGeneratorTyper�s r�rOrO�s��A��f�e�6�6�7�7r�c�8�	t|tj�Sr�)r~r��
GeneratorTyper�s r�rZrZ�s��
K��f�e�1�1�2�2r�c�8�	t|tj�Sr�)r~r��
CoroutineTyper�s r�rUrU�s��3��f�e�1�1�2�2r�c��	t|tj�xsht|tj�xr&t	|j
jtz�xs$t|tjj�Sr�)r~r�r�r�r��gi_coder�r�collections�abc�	Awaitabler�s r�rQrQ�sh��I��v�u�2�2�3�
:��v�u�2�2�3�
F��V�^�^�,�,�/D�D�E�
:�
�v�{���8�8�9�;r�c�8�	t|tj�Sr�)r~r��
TracebackTyper�s r�rcrc�s��N��f�e�1�1�2�2r�c�8�	t|tj�Sr�)r~r��	FrameTyper�s r�rXrX�s��
D��f�e�o�o�.�.r�c�8�	t|tj�Sr�)r~r��CodeTyper�s r�rTrT�s��O�,�f�e�n�n�-�-r�c�8�	t|tj�Sr�)r~r��BuiltinFunctionTyper�s r�rRrRs��H��f�e�7�7�8�8r�c�8�	t|tj�Sr�)r~r��MethodWrapperTyper�s r�r`r`s��8��f�e�5�5�6�6r�c��	t|�xs2t|�xs%t|�xst|�xst	|�Sr�)rRrYr^r_r`r�s r�rbrbsJ��F��f��
'��&�!�
'����
'�"�&�)�
'��v�&�	(r�c��	t|t�sy|jtzryt	t|�t
j�syt|d�ry|jj�D]\}}t|dd�s�y|jD]1}t|dd�D]}t||d�}t|dd�s�y�3y)NFT�__abstractmethods__�__isabstractmethod__r})r~r�	__flags__r%�
issubclassr��ABCMetar�rvr�r��	__bases__)r��namer��bases    r�rNrN!s���D��f�d�#��
���-�-���d�6�l�C�K�K�0���v�,�-�����,�,�.���e��5�0�%�8��/�� � ���D�"7��<�D��F�D�$�/�E��u�4�e�<��=�!�
r�c�l�g}t�}t|�}t|�rlt|�}	|jD]P}|j
j
�D]1\}}	t|	tj�s�!|j|��3�Rnd}|D]E}
	|||
�}|
|vrt�	|r||�r|j|
|f�|j|
��G|jd���|S#t$rY�jwxYw#t$r+|D]!}|
|j
vs�|j
|
}nY��Y��wxYw)Nr}c��|dS)Nrjr})�pairs r��<lambda>z_getmembers.<locals>.<lambda>`s��$�q�'r��r�)�set�dirrSrHr�rvr�r~r��DynamicClassAttribute�append�AttributeError�add�sort)r��	predicate�getter�results�	processed�names�mror��k�vr�r�s            r��_getmembersr9s:���G���I���K�E��v���V�n��	��(�(�� �M�M�/�/�1�D�A�q�!�!�U�%@�%@�A����Q��2�)�����
	��6�3�'�E��i��$�$� ��I�e�,��N�N�C��<�(��
�
�c��)�*�L�L�)�L�*��N��5�	��	���	����$�-�-�'� �M�M�#�.�E����	�		�s0�A	C0�9C0�C?�0	C<�;C<�?D3�D3�2D3c�&�	t||t�Sr�)rr��r�r�s  r�rDrDcs��G��v�y�'�2�2r�c�&�	t||t�Sr�)rr4rs  r�rErEhs��
��v�y�.�9�9r�rzname kind defining_class objectc	�`�	t|�}tt|��}td�|D��}|f|z}||z}t|�}|D]]}|jj�D]>\}}t
|tj�s�!|j��.|j|��@�_g}	t�}
|D�]R}d}d}
d}||
vrs	|dk(rtd��t||�}
t|
d|�}||vrEd}d}|D]}t||d�}||
us�|}�|D]}	|j||�}||
us�|}�|�|}	|D]'}||jvs�|j|}||vr|}n|���|
�|
n|}t
|t tj"f�rd}|}nJt
|t$tj&f�rd}|}n%t
|t(�rd}|}nt+|�rd}nd	}|	jt-||||��|
j/|���U|	S#t$rY��wxYw#t$rY��wxYw)
Nc3�>K�|]}|ttfvs�|���y�wr�)rr�)�.0�clss  r��	<genexpr>z'classify_class_attrs.<locals>.<genexpr>�s����H�7�C�c�$���.G�C�7�s��rvz)__dict__ is special, don't want the proxy�__objclass__z
static methodzclass method�property�method�data)rHr�tupler�rvr�r~r�r��fgetr�r��	Exceptionr��__getattr__r��staticmethod�BuiltinMethodType�classmethod�ClassMethodDescriptorTyperrbrr�)rr��metamro�class_bases�	all_basesr�r�r�r�resultr�r��homecls�get_obj�dict_obj�last_cls�srch_cls�srch_objr��kinds                    r�r'r'xsz���4��+�C��T�#�Y��G��H�7�H�H�G��&�3�,�K��g�%�I���H�E����M�M�'�'�)�D�A�q��!�U�8�8�9�a�f�f�>P����Q��*���F���I����������y� �
+��:�%�#�$O�P�P�!�#�t�,��"�'�>�7�C���+�-�#�G�#�H�$/��#*�8�T�4�#@��#�w�.�'/�H�%0�
%,��%�'/�';�';�C��'F�H�$�w�.�'/�H�
%,� �+�"*���D��t�}�}�$��=�=��.���'�)�"�G����?�
� �,�g�(���h��u�/F�/F� G�H�"�D��C�
��;��0O�0O�"P�
Q�!�D��C�
��(�
+��D��C�
�s�^��D��D��
�
�i��d�G�S�9�:��
�
�d��I�J�M��C .�%�$�%��%�
��
�s$�H!�H�	H�H�!	H-�,H-c��	|jSr�)�__mro__)rs r�rHrH�s��N��;�;�r���stopc�j�	|}t|�|i}tj�}t|t�s~t|d�rr|�||�r	|S|j}t|�}||vst|�|k\rtdj|���|||<t|t�s
t|d�r�r|S)Nr{z!wrapper loop when unwrapping {!r})
�idr��getrecursionlimitr~rr�r{�lenr��format)r�r$r��memo�recursion_limit�id_funcs      r�rhrh�s����	
�A�
�q�E�1�:�D��+�+�-�O���t�$���}�)E����T�
���K������T�(���t�O��T��o�!=��@�G�G��J�K�K���W�
���t�$���}�)E��Kr�c�n�	|j�}t|�t|j��z
Sr�)�
expandtabsr(�lstrip)�line�explines  r�rMrMs,��L��o�o��G��w�<�#�g�n�n�.�/�/�/r�c���tjj|j�}|�y|jjd�ddD]}t
||�}�t|�sy|S)N�.���)r�r�rwry�__qualname__�splitr�rS)r�rr�s   r��
_findclassr7s]��

�+�+�/�/�$�/�/�
*�C�
�{���!�!�'�'��,�S�b�1���c�4� ��2��3�<���Jr�c�r�t|�r.|jD]}|tus�	|j}|��|cSyt|�rb|jj}|j}t|�r'tt||d�d�|jur|}�nR|j}�nDt|�r)|j}t|�}|�t||�|u�ryt|�rR|j}|j}t|�r"|jdz|z|jk(r|}n�|j}n�t|t �r4|j"}|j}t|�}|�t||�|urpyt%|�st'|�rX|j}|j(}t||�|uryt+|�r't|dd�}t|t,�r
||vr||Sy|jD]}	t||�j}|��|cSy#t$rY��wxYw#t$rY�>wxYw)Nr�r3�	__slots__)rSr"r��__doc__r�r^r�r��__self__r��	__class__rYr7rRr5r~rrr_rWr
r]r�)r�r��docr��selfrr��slotss        r��_finddocr@!s
���s�|��K�K�D��6�!���,�,�C��?��J� ����}��|�|�$�$���|�|���D�M��G�D�$��-�z�:�c�l�l�J��C��.�.�C�	�C���|�|����o���;�'�#�t�,�C�7��	�3���|�|���|�|���D�M�����#�d�*�c�.>�.>�>��C��.�.�C�	�C��	"��x�x���}�}�������;�'�#�t�,�C�7��	�C�	 �$4�S�$9��|�|�������3���S�(���c�"��C��d�3�E��%��&�4�5�=��T�{�"������	��$��%�-�-�C��?��J�
���m&�����d�	��	�s#�H�;H*�	H'�&H'�*	H6�5H6c��		|j}|�	t|�}t	|t
�syt
|�S#t$rYywxYw#ttf$rYywxYwr�)r:r�r@r�r~r�r()r�r=s  r�r<r<_sq��B�
��n�n���{�	��6�"�C��c�3����C�=��������
�	�*�	��	�s �9�A�	A�A�A�Ac�B�		|j�jd�}tj}|ddD]8}t	|j��}|s�t	|�|z
}t
||�}�:|r|dj�|d<|tjkr%tdt	|��D]
}|||d||<�|r|ds|j�|r|ds�|r|ds|jd�|r|ds�dj|�S#t$rYywxYw)N�
�rjr4)r.r6r��maxsizer(r/�min�range�pop�join�UnicodeError)r=�lines�marginr0�content�indent�is       r�r(r(rs��� ���� �&�&�t�,��
�����!�"�I�D��$�+�+�-�(�G���T��W�,���V�V�,��	���Q�x���(�E�!�H��C�K�K���1�c�%�j�)��e�A�h�v�w�6G�5��8�)��E�"�I��I�I�K��E�"�I��E�!�H��I�I�a�L��E�!�H��y�y�����)����s�D�	D�Dc���	t|�r3t|dd�r|jStdj	|���t|�r�t
|d�r\tjj|j�}t|dd�r|jS|jdk(rtd��tdj	|���t|�r|j}t|�r|j}t!|�r|j"}t%|�r|j&}t)|�r|j*Stdj	t-|�j.���)N�__file__z{!r} is a built-in modulery�__main__�source code not availablez{!r} is a built-in classzVmodule, class, method, function, traceback, frame, or code object was expected, got {})rar�rQr�r)rSr�r�r�rwry�OSErrorr^r�rYr�rc�tb_framerX�f_coderT�co_filenamerr�)r�r�s  r�r=r=�s)��J�����6�:�t�,��?�?�"��3�:�:�6�B�C�C��v���6�<�(��[�[�_�_�V�%6�%6�7�F��v�z�4�0����&�� � �J�.��9�:�:��2�9�9�&�A�B�B���������&�������6�������v������
�f�~��!�!�!�
�7�7=�v���L�)�)�8+�,�,r�c� �	tjj|�}tjj�D�cgc]}t
|�|f��}}|j�|D]\}}|j|�s�|d|cSycc}wr�)	�os�path�basename�	importlib�	machinery�all_suffixesr(r��endswith)rZ�fname�suffix�suffixes�neglens     r�rGrG�s���;��G�G���T�"�E�#,�"5�"5�"B�"B�"D�F�"D���f�+��v�&�"D�
�F��M�M�O�"�����>�>�&�!���&�>�!�#���
Fs�Bc�p��	t|��tjjdd}|tjjddz
}t�fd�|D��rAtjj��dtjjdz�n-t�fd�tjjD��ry�tjvr�Stjj��r�St|��}t|dd���Stt|dd�dd���Sy)Nc3�@�K�|]}�j|����y�wr��r_�r�s�filenames  �r�r	z getsourcefile.<locals>.<genexpr>�s�����
?�)>�A�8���Q��)>���rjc3�@�K�|]}�j|����y�wr�rfrgs  �r�r	z getsourcefile.<locals>.<genexpr>�s$�����
9�7�'(�X�
�
�q�
!�7�rj�
__loader__�__spec__�loader)r=r\r]�DEBUG_BYTECODE_SUFFIXES�OPTIMIZED_BYTECODE_SUFFIXES�anyrYrZ�splitext�SOURCE_SUFFIXES�EXTENSION_SUFFIXES�	linecache�cache�existsrFr�)r��all_bytecode_suffixesr�ris   @r�rKrK�s�����v��H�%�/�/�G�G��J���Y�0�0�L�L�Q�O�O��
�
?�)>�
?�?��G�G�$�$�X�.�q�1��'�'�7�7��:�;��	�
9��$�$�7�7�
9�
9���9�?�?�"���	�w�w�~�~�h����
�v�x�
(�F��v�|�T�*�6���	����T�2�H�d�	C�	O���
Pr�c��	|�t|�xst|�}tjj	tjj|��Sr�)rKr=rYrZ�normcase�abspath)r��	_filenames  r�r/r/�sD��2���!�&�)�<�W�V�_�	�
�7�7���B�G�G�O�O�I�6�7�7r�c��	t|�r|St|d�r)tjj	|j
�S|�.|tvr&tjj	t|�S	t||�}|tvr&tjj	t|�Stjj�j�D]�\}}t|�s�t|d�s�|j}|tj	|d�k(r�E|t|<t|�}|jxt|<ttj j#|�<��|tvr&tjj	t|�Stjd}t|d�syt||j�rt%||j�}||ur|Stjd}t||j�rt%||j�}	|	|ur|Syy#ttf$rYywxYw)NryrQrRr��builtins)rar�r�r�rwry�
modulesbyfiler/r��FileNotFoundError�copyr�rQ�_filesbymodnamer�rYrZ�realpathr�)
r�r|�file�modnamer�r��main�
mainobject�builtin�
builtinobjects
          r�rFrF�s���K�����
��v�|�$��{�{���v�0�0�1�1����m�!;��{�{���}�Y�7�8�8���&�)�,���}���{�{���}�T�2�3�3��;�;�+�+�-�3�3�5�����F����
� ;����A��O�'�'���6�6��'(�O�G�$��6�"�A�(.���
7�M�!��}���� � ��#� %�6��}���{�{���}�T�2�3�3��;�;�z�"�D��6�:�&���t�V�_�_�%��T�6�?�?�3�
�����K��k�k�*�%�G��w����(������9�
��F�"��N�#�)��;
�(�)����s�5H6�6I�Ic��eZdZy)rN�r�ryr5r}r�r�rrs��r�rc�"�eZdZd�Zd�ZeZd�Zy)�_ClassFinderc� �g|_||_yr�)rf�qualname)r>r�s  r��__init__z_ClassFinder.__init__s����
� ��
r�c��|jj|j�|jjd�|j|�|jj	�|jj	�y)Nz<locals>)rfr�r��
generic_visitrH)r>�nodes  r��visit_FunctionDefz_ClassFinder.visit_FunctionDefsT���
�
���$�)�)�$��
�
���*�%����4� ��
�
�����
�
���r�c�x�|jj|j�|jdj	|j�k(rB|j
r|j
dj}n|j}|dz}t|��|j|�|jj�y)Nr3rjrD)
rfr�r�r�rI�decorator_list�linenorr�rH)r>r��line_numbers   r��visit_ClassDefz_ClassFinder.visit_ClassDefs����
�
���$�)�)�$��=�=�C�H�H�T�Z�Z�0�0��"�"�"�1�1�!�4�;�;��"�k�k��
�1��K�%�k�2�2����4� ��
�
���r�N)r�ryr5r�r��visit_AsyncFunctionDefr�r}r�r�r�r�s��!��/��
r�r�c��	t|�}|rtj|�n8t|�}|j	d�r|jd�st
d��t||�}|r!tj||j�}ntj|�}|st
d��t|�r|dfSt|�rZ|j}dj|�}tj|�}t!|�}	|j#|�t
d��t)|�r|j*}t-|�r|j.}t1|�r|j2}t5|�r|j6}t9|�rkt;|d�st
d	��|j<d
z
}
t?j@d�}|
dkDr'	||
}|jE|�r	||
fS|
d
z
}
|
dkDr�'||
fSt
d
��#t$$r}|j&d}	||	fcYd}~Sd}~wwxYw#tB$rt
d��wxYw)N�<�>rSzcould not get source coderj�zcould not find class definition�co_firstlinenoz"could not find function definitionrDz>^(\s*def\s)|(\s*async\s+def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)zlineno is out of boundszcould not find code object)#rKru�
checkcacher=�
startswithr_rTrF�getlinesrvrarSr5rI�ast�parser��visitr�argsr^r�rYr�rcrUrXrVrTr�r��re�compile�
IndexError�match)
r�r�r�rKr��source�tree�class_finder�er��lnum�patr0s
             r�r*r*.s ��9��� �D�����T�"��v�������$����s�);��5�6�6�
�v�t�
$�F�
��"�"�4����9���"�"�4�(����1�2�2�����a�x���v���&�&���������y�y�� ��#�H�-��	=����t�$�
�;�<�<���������&�������6�������v������
�f�~��v�/�0��>�?�?��$�$�q�(���j�j�Z�[���Q�h�
9��T�{���y�y�����d�{���!�8�D��Q�h��d�{��
�.�
/�/��9#�	&��&�&��)�K��+�%�%��	&��,�
9��7�8�8�
9�s*�G?�
H(�?	H%�H �H%� H%�(H=c�,�		t|�\}}t|�r�d}|r
|ddddk(rd}|t	|�kr>||j�dvr)|dz}|t	|�kr||j�dvr�)|t	|�kr{||dddk(rog}|}|t	|�krL||dddk(rA|j
||j��|dz}|t	|�kr||dddk(r�Adj|�Syy|dkD�rwt||�}|dz
}|dk\�r]||j�dddk(�rBt||�|k(�r/||j�j�g}|dkDr�|dz
}||j�j�}|dddk(r]t||�|k(rL|g|dd|dz
}|dkrn;||j�j�}|dddk(rt||�|k(r�L|r4|dj�dk(rg|dd|r|dj�dk(r�|r4|dj�dk(rg|dd|r|dj�dk(r�dj|�Syyyy#ttf$rYywxYw)	Nrj�z#!rD)r��#r�r�r4)r*rTr�rar(�stripr�r.rIrMr/)r�rKr��start�comments�endrN�comments        r�r9r9rs����� ��(���t�������U�1�X�b�q�\�T�)�1�5��c�%�j� �U�5�\�%7�%7�%9�Y�%F��A�I�E��c�%�j� �U�5�\�%7�%7�%9�Y�%F��3�u�:��%��,�r��"2�c�"9��H��C���E�
�"�u�S�z�"�1�~��'<�����c�
� 5� 5� 7�8��A�g����E�
�"�u�S�z�"�1�~��'<��7�7�8�$�$�
#:��
����E�$�K�(���Q�h���!�8��c�
�)�)�+�B�Q�/�3�6��u�S�z�"�f�,��c�
�-�-�/�6�6�8�9�H��Q�w��A�g����*�/�/�1�8�8�:���b�q�k�S�(�Z��c�
�-C�v�-M�$+�9�H�R�a�L���'�C��Q�w��#�C�j�3�3�5�<�<�>�G�	�b�q�k�S�(�Z��c�
�-C�v�-M�
�x��{�0�0�2�c�9�!���!���x��{�0�0�2�c�9��x��|�1�1�3�s�:� "����
��x��|�1�1�3�s�:��7�7�8�$�$�
-�7�8�
��%
�Y�����s�J�J�Jc��eZdZy)rNr�r}r�r�rr�s�r�rc��eZdZ	d�Zd�Zy)r	c�f�d|_d|_d|_d|_d|_d|_d|_y)NrjFrD)rN�islambda�started�passline�indecorator�last�	body_col0�r>s r�r�zBlockFinder.__init__�s4�������
������
� �����	���r�c�R�|js?|js3|dk(rd|_d|_y|dvr|dk(rd|_d|_d|_y|tj
k(r8d|_|d|_|jrt�|jrd|_yy|jry|tjk(r>|j�|jr
|d|_	|jdz|_
d|_y|tjk(r*|jdz
|_
|jdkrt�y|tjk(r+|j�|d|jk\r|d|_yyy|jdk(r)|tjtjfvrt�yy)N�@T)�def�class�lambdar�FrjrD)r�r�r�r��tokenize�NEWLINEr�r�INDENTr�rN�DEDENT�COMMENT�NL)r>r�token�srowcol�erowcolr0s      r��
tokeneaterzBlockFinder.tokeneater�s����|�|�D�$4�$4���|�#'�� �!�D�M�	�4�4��H�$�$(�D�M�#��� �D�M�
�X�%�%�
%�!�D�M���
�D�I��}�}� � ����#(�� � �
�]�]��
�X�_�_�
$��~�~�%�$�,�,�!(������+�+��/�D�K� �D�M�
�X�_�_�
$��+�+��/�D�K��{�{�a�� � � �
�X�%�%�
%��~�~�)�g�a�j�D�N�N�.J�#�A�J��	�/K�)��[�[�A�
�$�x�/?�/?����.M�"M���#N�
r�N)r�ryr5r�r�r}r�r�r	r	�s��J��)r�r	c��	t�}	tjt|�j�}|D]}|j
|��	|d|jS#ttf$rY� t$rW}d|jvr|d�^}}	|j
tjg|���n#ttf$rYnwxYwYd}~�zd}~wwxYw)N�	unmatched)r	r��generate_tokens�iter�__next__r�r�IndentationError�SyntaxError�msgr�r�)rK�blockfinder�tokens�_tokenr��_�_token_infos       r�r5r5�s���J��-�K�
��)�)�$�u�+�*>�*>�?���F�"�K�"�"�F�+���"�+�"�"�#�#��
�(�)�
�����a�e�e�#���� ���K�	�"�K�"�"�8�#3�#3�B�k�B���,�-�	��	���
�sA�>A�C�,C�4C�
!B,�+C�,B>�;C�=B>�>C�Cc���	t|�}t|�\}}t|�r|j}t	|�s$t|�r|jjdk(r|dfSt||d�|dzfS)Nz<module>rjrD)	rhr*rcrUrarXrV�co_namer5�r�rKr�s   r�rLrL�sv��6��F�^�F��V�$�K�E�4��6������	���	���V�]�]�2�2�j�@��a�x����d�e��%�t�a�x�/�/r�c�B�	t|�\}}dj|�S)Nr�)rLrIr�s   r�rJrJ�s&��A�
!��(�K�E�4�
�7�7�5�>�r�c���	g}|jtdd���|D]C}|j||jf�||vs�%|jt	||||���E|S)Nryr�r�)r�rlr�r�ri)�classes�children�parentr��cs     r�riri	se��7��G��L�L�Z��j�9�L�:�
������1�;�;�'�(���=��N�N�8�H�Q�K��1�=�>���Nr�c�0�	i}g}|D]c}|jr?|jD]/}||vrg||<|||vr||j|�|s�*||vs�/�L�N||vs�S|j|��e|D]}||vs�|j|��t||d�Sr�)r�r�ri)r��uniquer��rootsr�r�s      r�r7r7s���E��H��E�
���;�;��+�+����)�')�H�V�$��H�V�,�,��V�$�+�+�A�.��f��/��&��e�^��L�L��O������ ��L�L�� ���E�8�T�*�*r�rzargs, varargs, varkwc��	t|�stdj|���|j}|j}|j
}t
|d|�}t
||||z�}||z
}d}|jtzr|j|}|dz}d}|jtzr|j|}t||z||�S)Nz{!r} is not a code objectrD)rTr�r)�co_varnames�co_argcount�co_kwonlyargcount�listr�rrr)�cor��nargs�nkwargsr��
kwonlyargs�varargs�varkws        r�r0r00s�����"�:��3�:�:�2�>�?�?��N�N�E��N�N�E��"�"�G���f�u�
��D��e�E�%��-�0�1�J�	�W��E��G�	�{�{�Z���.�.��'����	���E�	�{�{�^�#����u�%���T�J�&���7�7r�rzGargs, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotationsc	��		t|ddtd��}g}d}d}g}g}i}d}	i}
|j|j
ur|j|d<|jj�D�]}|j}|j}
|tur:|j|
�|j|j
ur�|	|jfz
}	n�|tur:|j|
�|j|j
urg|	|jfz
}	nV|tur|
}nK|tur9|j|
�|j|j
ur|j|
|
<n
|t ur|
}|j"|j
us��|j"||
<��!|
sd}
|	sd}	t%||z|||	||
|�S#t$r}td�|�d}~wwxYw)NF)�follow_wrapper_chains�skip_bound_arg�sigclsrtzunsupported callabler}�return)�_signature_from_callabler$rr��return_annotation�empty�
parameters�valuesr r��_POSITIONAL_ONLYr��default�_POSITIONAL_OR_KEYWORD�_VAR_POSITIONAL�
_KEYWORD_ONLY�_VAR_KEYWORD�
annotationr)r��sig�exr�r�r��posonlyargsr��annotations�defaults�
kwdefaultsr�r r�s              r�r?r?Ns����8�"'�t�=B�6;�.7�05�	7���D��G��E��K��J��K��H��J�
���C�I�I�-� #� 5� 5��H�����&�&�(���z�z���z�z���#�#����t�$��}�}�E�K�K�/��U�]�]�,�,��
�+�
+��K�K����}�}�E�K�K�/��U�]�]�,�,��
�_�
$��G�
�]�
"����d�#��}�}�E�K�K�/�#(�=�=�
�4� �
�\�
!��E����5�;�;�.� %� 0� 0�K���-)�0��
�����{�T�)�7�E�8�!�:�{�<�<��g�8�
�.�/�R�7��8�s�F&�&	G�/F;�;Grzargs varargs keywords localsc�f�	t|j�\}}}t||||j�Sr�)r0rVr�f_locals)�framer�r�r�s    r�r1r1�s3��=�#�5�<�<�0��D�'�5��4��%����8�8r�c�X�t|dd�dk(r#d�}tjd|t|��St	|t
j�rt|�St	|t�r8|jd|fvr|jS|jdz|jzSt|�S)Nry�typingc�D�|j�}|jd�S)Nztyping.)�group�removeprefix)r��texts  r��replzformatannotation.<locals>.repl�s���;�;�=�D��$�$�Y�/�/r�z[\w\.]+r~r3)r�r��sub�reprr~r��GenericAliasr�rryr5)r�base_modulers   r�r+r+�s����z�<��.�(�:�	0��v�v�j�$��Z�(8�9�9��*�e�0�0�1��:����*�d�#�� � �Z��$=�=��*�*�*��$�$�S�(��)@�)@�@�@��
��r�c�,��t|dd���fd�}|S)Nryc���t|��Sr�)r+)rr�s �r��_formatannotationz5formatannotationrelativeto.<locals>._formatannotation�s����
�F�3�3r�)r�)r�rr�s  @r�r,r,�s���
�V�\�4�
0�F�4��r�c��d|zS)N�*r}�r�s r�r�r��s��s�T�zr�c��d|zS)N�**r}r s r�r�r��s��T�D�[r�c��dt|�zS)N�=)r)r�s r�r�r��s
��c�D��K�.?r�c�>�	|||fd�}g}	tt|��D]}
|	j|||
���|r#|	j||�|||�z�|r#|	j||�|||�z�ddj|	�zdzS)Nc�*�||�|||�zSr�r})r�rs�	formatarg�formatvalues    r��convertz formatargvalues.<locals>.convert�s������V�D�\�!:�:�:r��(�, �))rGr(r�rI)r�r�r�rsr'�
formatvarargs�formatvarkwr(r)�specsrOs           r�r-r-�s���
M�$�#��;�
�E�
�3�t�9�
��
���W�T�!�W�%�&���
���]�7�+�k�&��/�.J�J�K��
���[��'�+�f�U�m�*D�D�E�����5�!�!�C�'�'r�c�.�|D�cgc]}||vs�t|���}}t|�}|dk(r|d}n@|dk(rdj|�}n+dj|dd�}|dd�=dj|�|z}t	d|||rd	nd
|dk(rdnd|fz��cc}w)
NrDrjr�z	{} and {}z, {} and {}���r+z*%s() missing %i required %s argument%s: %s�
positional�keyword-onlyr�rh)rr(r)rIr�)	�f_name�argnames�posr�r�r��missingrh�tails	         r��_missing_argumentsr9�s���$,�C�H�D��F�0B�T�$�Z�H�E�C��%�j�G��!�|��!�H��	�A���K����&��#�}�#�#�U�2�3�Z�0���"�#�J��I�I�e��t�#��
�@��W�&)�l�~�#�q�L�b�c�1�6�6�7�7��
Ds
�	B�
Bc
�v�t|�|z
}t|D�cgc]	}||vs�|��c}�}	|r|dk7}
d|fz}n7|rd}
d|t|�fz}n"t|�dk7}
tt|��}d}|	rd}
|
|dk7rdnd|	|	dk7rdndfz}td|||
rdnd|||dk(r|	s	d	fz��d
fz��cc}w)NrDzat least %dTz
from %d to %dr�z7 positional argument%s (and %d keyword-only argument%s)rhz5%s() takes %s positional argument%s but %d%s %s given�was�were)r(r�r�)r4r��kwonlyr��defcount�givenr��atleast�arg�kwonly_given�pluralr�
kwonly_sigr�s              r��	_too_manyrE�s	���$�i�(�"�G��v�?�v������v�?�@�L���A����w�j�(��	�����#�d�)� 4�4���T��a����#�d�)�n���J��G���E�Q�J�S�B��$0�A�$5�S�2�?�?�
�
�K�
�S��#�R��
��q�j��U�
C�C�D�D�;A�
C�C�D�D��@s
�	B6�B6c	�R�	t|�}|\}}}}}}	}
|j}i}t|�r|j�|jf|z}t	|�}
t	|�}|rt	|�nd}t|
|�}t
|�D]
}|||||<�|rt||d�||<t||z�}|ri||<|j�D]=\}}||vr|st|�d|����||||<�%||vrt|�d|����|||<�?|
|kDr|st||||||
|�|
|krH|d||z
}|D]}||vs�t||d|��t|||z
d�D]\}}||vs�||||<�d}|D]}||vs�|	r
||	vr	|	|||<�|dz
}�|rt||d|�|S)Nrjz&() got an unexpected keyword argument z$() got multiple values for argument TrDF)r?r�r^r;r(rFrGrr�r�r�rEr9�	enumerate)r�r2�named�specr�r�r�rr��kwonlydefaultsr�r4�	arg2value�num_pos�num_args�num_defaults�nrO�possible_kwargs�kwr��reqrAr7�kwargs                         r�r6r6s/��-�
�$��D�FJ�C�D�'�5�(�J���
�]�]�F��I���~�$�-�-�3��m�m�%�
�2�
��*�o�G��4�y�H�$,�3�x�=�!�L��G�X��A�
�1�X��'��]�	�$�q�'����"�:�a�b�>�2�	�'���$��+�,�O���	�%���[�[�]�	��E�
�_�$���!'��!-�.�.�#(�I�e��R� ��
��?��#�R�)�*�
*��	�"�
�#����'��&�$�
�G�\��I�	'�����+�H�|�+�,���C��)�#�"�6�3��i�@�� ��X��%<�%=� >�?�F�A�s��)�#�!)�!��	�#��@��G����	�!��%�>�"9�#1�%�#8�	�%� ��1������6�:�u�i�@��r�rz"nonlocals globals builtins unboundc��	t|�r|j}t|�stdj	|���|j
}|j�i}n=t|j|j�D��cic]\}}||j��}}}|j}|jdtj�}t|�r|j}i}i}t�}	|j D]}
|
dvr�	||
||
<�t'||||	�Scc}}w#t"$r-	||
||
<n #t"$r|	j%|
�YnwxYwY�\wxYw)N�{!r} is not a Python function�__builtins__)�None�True�False)r^r�rYr�r)r��__closure__�zip�co_freevars�
cell_contentsrzrwr~rvrar��co_names�KeyErrorr�r)r��code�
nonlocal_vars�var�cell�	global_ns�
builtin_ns�global_vars�builtin_vars�
unbound_namesr�s           r�r8r8Fsm�����~��}�}���d���7�>�>�t�D�E�E��=�=�D������
�!��!1�!1�4�3C�3C�D�	�D�	��T�
�$�$�$�$�D�	�	�� � �I����~�x�/@�/@�A�J��
���(�(�
��K��L��E�M��
�
���,�,�
�	(� )�$��K���
��}�k�#�]�4�4��7	��*�	(�
(�%/��%5��T�"���
(��!�!�$�'�
(��	(�s<�<D�<D�	E�$D-�,E�-E
�E�	E
�
E�E�
_Tracebackz+filename lineno function code_context indexc�*��eZdZdd��fd�
Zd�Z�xZS)r&N��	positionsc�>��t�|�||||||�}||_|Sr���super�__new__rl)	rrir��function�code_context�indexrl�instancer<s	        �r�rpzTraceback.__new__~s)����7�?�3��&�(�L�RW�X��&����r�c��dj|j|j|j|j|j
|j�S)NzcTraceback(filename={!r}, lineno={!r}, function={!r}, code_context={!r}, index={!r}, positions={!r}))r)rir�rqrrrsrlr�s r��__repr__zTraceback.__repr__�s@��@�@F���
�
�t�{�{�D�M�M�4�;L�;L��
�
�D�N�N�A,�	-r��r�ryr5rprv�
__classcell__�r<s@r�r&r&}s���SW��
-r�r&c�^�|jj|j}}t||�Sr�)rUrV�tb_lasti�_get_code_position)�tbr`�instruction_indexs   r��_get_code_position_from_tbr�s(�� �k�k�0�0�"�+�+�
�D��d�$5�6�6r�c�t�|dkry|j�}ttj||dzd��S)Nrj)NNNNr�)�co_positions�next�	itertools�islice)r`r~�
positions_gens   r�r|r|�s;���1��'��%�%�'�M��	� � ��0A�Q�0F��M�N�Nr�c
��	t|�r$t|�}|j}|j}n,|j}t|j|j�}|d�
||g|dd��^}}n|g|��^}}|d}t|�stdj|���t|�xst|�}|dkDrM|dz
|dzz
}	t|�\}}tdt|t!|�|z
��}||||z}|dz
|z
}ndx}}t%|||jj&||t)j*|���S#t"$rdx}}Y�DwxYw)NrjrDz'{!r} is not a frame or traceback objectr�rk)rcr�	tb_linenorU�f_linenor|rV�f_lastirXr�r)rKr=r*�maxrFr(rTr&r��dis�	Positions)	r�contextrlr�rir�rKr�rss	         r�r>r>�sv��>��5��.�u�5�	�������������&�u�|�|�U�]�]�C�	���|��"�F�;�Y�q�r�]�;���	�"�/�Y�/���	�
�q�\�F��5�>��A�H�H��O�P�P��U�#�5�w�u�~�H���{���
�W�a�Z�'��	'�$�U�+�K�E�4���3�u�c�%�j�7�&:�;�<�E��%��g�
�.�E��Q�J��&�E������X�v�u�|�|�';�';�U��c�m�m�Y�&?�A�A���	!� � �E�E�	!�s�
E�
E�Ec��	|jSr�)r��rs r�rCrC�s��M��>�>�r��
_FrameInfor�c�*��eZdZdd��fd�
Zd�Z�xZS)rNrkc	�@��t�	|�|||||||�}||_|Sr�rn)
rrrir�rqrrrsrlrtr<s
         �r�rpzFrameInfo.__new__�s+����7�?�3��x���<�Y^�_��&����r�c	��dj|j|j|j|j|j
|j|j�S)NzoFrameInfo(frame={!r}, filename={!r}, lineno={!r}, function={!r}, code_context={!r}, index={!r}, positions={!r}))r)rrir�rqrrrsrlr�s r�rvzFrameInfo.__repr__�sG��@�@F���
�
�D�M�M�4�;�;��
�
��!�!�4�:�:�t�~�~�A?�	@r�rwrys@r�rr�s���Z^��
@r�rc��	g}|rEt||�}|f|z}|jt|d|ji��|j}|r�E|S�Nrl)r>r�rrl�f_back)rr��	framelist�traceback_info�	frameinfos     r�rIrI�s^��G��I�
�%�e�W�5���H�~�-�	�����I�R��9Q�9Q�R�S�����	�
�r�c��	g}|rOt||�}|jf|z}|jt|d|ji��|j
}|r�O|Sr�)r>rUr�rrl�tb_next)r}r�r�r�r�s     r�rBrB�sb��G��I�
�%�b�'�2���[�[�N�^�3�	�����I�R��9Q�9Q�R�S�
�Z�Z��	
�
�r�c�R�	ttd�rtjd�SdS)N�	_getframerD)r�r�r�r}r�r�r)r)�s"��I�&�s�K�8�3�=�=���B�d�Br�c�B�	ttjd�|�S)NrD)rIr�r�)r�s r�rfrf�s��J��#�-�-��*�G�4�4r�c�d�	tj�}|�dn|j}t||�Sr�)r��	exception�
__traceback__rB)r��excr}s   r�rgrg�s.��M�

�-�-�/�C����#�"3�"3�B��"�g�&�&r�r"rvc��i}	tj|d�}tj	||t
�S#t$rY�&wxYw�Nrv)r��__getattribute__r�r�rw�	_sentinel)r��attr�
instance_dicts   r��_check_instancer�sG���M�
��/�/��Z�@�
��8�8�M�4��3�3���
��
�s�5�	A�Ac��t|�D]<}tt|��tus�||jvs�-|j|cStSr�)�_static_getmro�_shadowed_dictrr�rv)�klassr��entrys   r��_check_classr�
sD����&���$�u�+�&�)�3�����8N��>�>�$�'�'�'��r�c���|D]Z}|�}t|�}d|vs�|d}t|�tjur|jdk(r|j
|ur�X|cStSr�)�_get_dunder_dict_of_classrr�r�r�r
r�)�weakref_mro�
weakref_entryr��dunder_dict�
class_dicts     r��%_shadowed_dict_from_weakref_mro_tupler�sn��$�
����/��6����$�$�Z�0�J���$��(B�(B�B��'�'�:�5��+�+�u�4�!�!�%��r�c�\�tt|�D�cgc]
}t|���c}�Scc}wr�)r�r��make_weakref)r�r�s  r�r�r�$s2��1�+9�%�+@�	A�+@�%�,�u�
�+@�	A����	As�)c��	t}t|�}tt|�vr=|}t|�}|tust|�tj
urt
||�}n|}t||�}|tur[|turStt|�d�tur8tt|�d�tustt|�d�tur|S|tur|S|tur|S||urStt|��D]<}tt|��tus�||jvs�-|j|cS|tur|St|��)Nr�r�r�)
r�rr�r�r�r�r�r�rvr�)	r�r�r�instance_result�objtyper��	dict_attr�klass_resultr�s	         r�r4r41s7��	� �O��3�i�G��>�'�*�*���"�5�)�	���"���O�u�9�9�9�-�c�4�8�O�����t�,�L��i�'�L�	�,I���\�*�I�6�i�G���l�+�Y�7�y�H��D��.��=�Y�N����i�'����9�$���
�e�|�#�D��K�0�E��t�E�{�+�y�8��E�N�N�*��~�~�d�+�+�1��i����
��
�r�r r!r"rc�|�	|jrtS|jrtS|j�t
StSr�)�
gi_runningr!�gi_suspendedr"�gi_framerr )�	generators r�rArAjs?����������������!����r�c��	t|�stdj|���t|dd�}|�|jj
SiS)Nz{!r} is not a Python generatorr�)rZr�r)r�r�r)r�rs  r�r@r@|sS����y�!��8�?�?�	�J�K�K��I�z�4�0�E����!�!�*�*�*��	r�r
rrrc�|�	|jrtS|jrtS|j�t
StSr�)�
cr_runningr�cr_suspendedr�cr_framerr
)�	coroutines r�r;r;�s?����������������!����r�c�>�	t|dd�}|�|jSiS)Nr�)r�r)r�rs  r�r:r:�s,���

�I�z�4�0�E����~�~���	r�rrrrc�|�	|jrtS|jrtS|j�t
StSr�)�
ag_runningr�ag_suspendedr�ag_framerr)�agens r�r3r3�s;��������������}�}�����r�c��	t|�st|�d���t|dd�}|�|jjSiS)Nz  is not a Python async generatorr�)rOr�r�r�r)r�rs  r�r2r2�sM����d���4�(�"B�C�D�D��D�*�d�+�E����}�}�%�%�%��	r�c��	|dk(rt||d�}n
t||d�}|�t|t�ry|dk7rt	||�}|S)Nrp)r�r4r~�_NonUserDefinedCallables�_descriptor_get)r�method_name�meths   r��"_signature_get_user_defined_methodr��sZ����i���s�K��.���c�;��5���|�z�$�(@�A���i���t�S�)���Kr�c�>�	|j}t|j��}|jxsd}|jxsi}|r||z}	|j
|i|��}d}
|j�D�]K\}}	|j|}
|jtur|j|��;|jtur8||vrd}
|j|
��||<n|j|j���|jt ur|j|
��||<	|
s��|jtur0||jt ��}|||<|j%|���|jt t&fvr|j%|���|jt(us��1|j|j���N|j|j+���S#t$r"}dj|�}	t|	�|�d}~wwxYw#t"$rY��wxYw)Nr}z+partial object {!r} has incorrect argumentsFT)r�r �r�)r�rnr�r��keywords�bind_partialr�r)r��	argumentsr rrHr�replacer�rr_�move_to_endrrr�)�wrapped_sigr��
extra_args�
old_params�
new_params�partial_args�partial_keywords�barr��transform_to_kwonly�
param_namer��	arg_value�	new_params               r��_signature_get_partialr��s
���
�'�'�J��Z�-�-�/�0�J��<�<�%�2�L��'�'�-�2���!�L�0��&�
%�[�
%�
%�|�
H�7G�
H�� ��'�-�-�/��
�E�#	J����Z�0�I��z�z�-�-����z�*���z�z�3�3��!1�1�+/�'�-2�]�]�9�]�-M�J�z�*��N�N�5�:�:�.���z�z�]�*�).���y��)I�
�:�&���z�z�3�3�&�z�2�:�:�
�:�N�	�)2�
�:�&��&�&�z�2����
�|�<�<��&�&�z�2�����.����u�z�z�*�a0�d���*�*;�*;�*=��>�>��q�&�;�B�B�7�K����o�2�%��&���	��	�s*�G"�;H�"	H
�+H�H
�	H�Hc�*�	t|jj��}|r|djtt
fvrt
d��|dj}|ttfvr|dd}n|turt
d��|j|��S)Nrjzinvalid method signaturerDzinvalid argument typer�)rr�r�r rrr�rrrr�)r�paramsr s   r��_signature_bound_methodr�Hs�����3�>�>�(�(�*�
+�F��V�A�Y�^�^��m�'D�D��3�4�4��!�9�>�>�D��&�(8�9�9��������&��4�5�5��;�;�&�;�)�)r�c��	t|�xs1t|�xs$t|t�xs|tuxs|t
uSr�)rRr_r~r�rr�r�s r��_signature_is_builtinr�bsN���
�c�N�
)��s�#�
)��s�4�5�
)�
�4�K�
)��&�=�*r�c��	t|�rt|�ryt|dd�}t|dd�}t|dt�}t|dt�}t|dd�}t	|t
j�xrXt	|t�xrF|duxst	|t�xr.|duxst	|t�xrt	|t�xs|duS)NFr�r��__defaults__�__kwdefaults__rx)
r�rSr��_voidr~r�r�r�rr�)r�r�r`rrr
s      r�r�r�ps�����C�=�G�C�L���3�
�D�)�D��3�
�D�)�D��s�N�E�2�H���.��6�J��#�0�$�7�K��t�U�^�^�,�
E��t�S�!�
E�
��
�
<��H�e�!<�
E��4�
�
?�:�j�$�#?�
E���d�
,�
C��t�0C�	Gr�c�P�	|s|dfSd}|jd�D�cgc]}|s�|jd���}}t|�j}t	j|�}g}|j
}d}tj}	tj}
t|�}|D]L}|j|j}
}||	k(r
|
dk(r|dz
}||	k(r|
dk(r|}�7||
�|
dk(s�E|d��Ndj|�j�jdd�}||fScc}w)	NrC�asciirj�,rD�$� r�)r6�encoder�r�r�r�r��OP�
ERRORTOKENr�r�stringrIr�r�)re�self_parameter�lrKr��token_streamrr��current_parameterr�r��trr��clean_signatures               r��"_signature_strip_non_python_syntaxr�s.�����$����N�(1����(=�C�(=�1��Q�X�X�g�
�(=�E�C��U��$�$�I��$�$�Y�/�L�
�D�
�+�+�C���	���B��!�!�J�	
�\��A����v�v�q�x�x�f���2�:���}�!�Q�&�!��B�J�V�s�]�.�N���F���c�M���H���g�g�d�m�)�)�+�3�3�D�"�=�O��N�*�*��?
Ds
�D#�D#Tc������������	|j�t|�\}}d|zdz}	tj|�}t|tj�stdj����|jd}g��j�d}i�t�dd�}	|	r.tjj|	d�}|r|j�tjj!��d����fd��G�fd�d	tj"���f�������fd
�	}
t%|j&j(�t%|j&j&�z}|t%|j&j*�z
}t-j.t-j0d|�|j&j*�}
�j2�t5|j&j(|
�D]\}}|
||���j6�t5|j&j&|
�D]\}}|
||��|j&j8r)�j:�|
|j&j8���j<�t5|j&j>|j&j@�D]\}}|
||��|j&jBr)�jD�|
|j&jB��|�Xt�dd�}|du}tG|�}|r|s|r�jId�n$�djK�j2��}
|
�d<|�|j�
�S#t$rd}Y��EwxYw)Nzdef fooz: pass�"{!r} builtin has invalid signaturerjryc�H�|j�td��|jS)Nz'Annotations are not currently supported)rr�rA)r�s r��
parse_namez&_signature_fromstr.<locals>.parse_name�s!���?�?�&��F�G�G��x�x�r�c���	t|��}t|tt
ttttd�f�rtj|�St�#t$r$	t|��}n#t$rt�wxYwY�vwxYwr�)r��	NameErrorr�r~r��int�float�bytesr�rr��Constant)rhr��module_dict�sys_module_dicts  ��r��
wrap_valuez&_signature_fromstr.<locals>.wrap_value�s����	!���K�(�E��e�c�3��u�d�D��J�G�H��<�<��&�&�����	!�
!��Q��0����
!� � �
!���	!�s)�A�	B�#A0�/B�0B�B�Bc�(��eZdZ�fd�Z�fd�Zd�Zy)�,_signature_fromstr.<locals>.RewriteSymbolicsc�~��g}|}t|tj�rB|j|j�|j
}t|tj�r�Bt|tj�st�|j|j�djt|��}�|�S)Nr3)r~r�rr�r�r��Namer�r&rI�reversed)r>r��arOr�rs     �r��visit_Attributez<_signature_fromstr.<locals>.RewriteSymbolics.visit_Attribute�s�����A��A��Q��
�
�.������� ��G�G���Q��
�
�.��a����*� � �
�H�H�Q�T�T�N��H�H�X�a�[�)�E��e�$�$r�c���t|jtj�s
t	���|j
�Sr�)r~�ctxr��Loadr�r&)r>r�rs  �r��
visit_Namez7_signature_fromstr.<locals>.RewriteSymbolics.visit_Name�s,����d�h�h����1� �l�"��d�g�g�&�&r�c���|j|j�}|j|j�}t|tj
�rt|tj
�st�t|jtj�r,t	j
|j|jz�St|jtj�r,t	j
|j|jz
�St|jtj�r,t	j
|j|jz�St�r�)r��left�rightr~r�rr��op�Addr��Sub�BitOr)r>r�rrs    r��visit_BinOpz8_signature_fromstr.<locals>.RewriteSymbolics.visit_BinOp	s����:�:�d�i�i�(�D��J�J�t�z�z�*�E��d�C�L�L�1��E�3�<�<�9X� � ��$�'�'�3�7�7�+��|�|�D�J�J����$<�=�=��D�G�G�S�W�W�-��|�|�D�J�J����$<�=�=��D�G�G�S�Y�Y�/��|�|�D�J�J����$<�=�=��r�N)r�ryr5rrr")rs�r��RewriteSymbolicsr�s���
	%�	'�

	r�r#c����
|�}|r4|tur,	��j|�}tj|�}�	j
�|�|����y#t$rt	dj���d�wxYw)Nr�rr)�_emptyr�r��literal_evalr�r)r�)�	name_node�default_noderr�r#r#r�r r�r�rs    �������r��pz_signature_fromstr.<locals>.p	s�����)�$���L��6�
]�/�1�7�7��E���*�*�<�8��	���)�D�$��E�R�S���
]� �!E�!L�!L�S�!Q�R�X\�\�
]�s�+A�%Br;r��r�)&�_parameter_clsrr�r�r�r~�Moduler�r)�bodyr�r�r�r�rwrvr��NodeTransformerr(r�r	rr��chain�repeat�POSITIONAL_ONLYr[�POSITIONAL_OR_KEYWORD�vararg�VAR_POSITIONAL�KEYWORD_ONLYr��kw_defaultsrS�VAR_KEYWORDrarHr�)rr�rhr�rr��programr�r�r�r*�total_non_kw_args�required_non_kw_argsrr�r�_self�self_isbound�
self_ismoduler#r#r�r r
r�rrrs `                 @@@@@@@@@r��_signature_fromstrr?�s�������"�"�I�&H��&K�#�O�^��/�)�H�4�G�����7�#���f�c�j�j�)��=�D�D�S�I�J�J����A��A��J��O�O�E�
�F��K��#�|�T�2�K��������d�3��� �/�/�K��k�k�&�&�(�O����3�.�.��B,1�T�T��A�F�F�.�.�/�#�a�f�f�k�k�2B�B��,�s�1�6�6�?�?�/C�C�����y�/�/��6J�K�Q�V�V�_�_�]�H��$�$�D��q�v�v�1�1�8�<���w�	�$���=��*�*�D��q�v�v�{�{�H�5���w�	�$���6�	�v�v�}�}��'�'��	�!�&�&�-�-����!�!�D��Q�V�V�.�.����0B�0B�C�
��g�	�$���D�	�v�v�|�|��$�$��	�!�&�&�,�,����!���Z��.���D�(�� ���
��]�n��N�N�1���1�
�%�%�9�+D�+D�%�E�A��J�q�M��z�S�Y�Y�7�7�������s�M;�;N
�	N
c��	t|�stdj|���t|dd�}|st	dj|���t||||�S)Nz%{!r} is not a Python builtin function�__text_signature__z#no signature found for builtin {!r})r�r�r)r�r�r?)rr�r�rhs    r��_signature_from_builtinrBI	sh���!��&��#�#)�6�$�<�1�	1�	��*�D�1�A���>�E�E�d�K�L�L��c�4��N�;�;r�c
��	d}t|�s(t|�rd}ntdj|���t	|dd�}|rt||||�S|j}|j}	|	j}
|	j}|	j}|d|
}
|	j}||
|
|z}t||||��}|j}|j}|rt|�}nd}g}|
|z
}|}|
d|D]H}|rt nt"}|j%|t&�}|j)||||���|s�D|dz}�Jt+|
|d�D]O\}}|rt nt"}|j%|t&�}|j)||||||�	��|s�K|dz}�Q|	j,t.zr<||
|z}|j%|t&�}|j)|||t0���|D]U}t&}|�|j%|t&�}|j%|t&�}|j)|||t2|�	���W|	j,t4zrV|
|z}|	j,t.zr|dz
}||}|j%|t&�}|j)|||t6���|||j%d
t&�|��S)NFTrUrArqrj)rr rD)rr rr��r��__validate_parameters__)rYr�r�r)r�r?r,r�r�r��co_posonlyargcountr�r.r�r�r(rrrwr&r�rGr�rrrrr)rr�r�rrrsrt�is_duck_functionrhr#�	func_code�	pos_count�	arg_names�
posonly_countr2�keyword_only_count�keyword_onlyr
rr�pos_default_countr��non_default_count�posonly_leftr�r r�offsetrrss                             r��_signature_from_functionrRY	s��M����d��%�d�+�#���;�B�B�4�H�I�I���*�D�1�A��!�#�t�Q��?�?��"�"�I��
�
�I��%�%�I��%�%�I��0�0�M��:�I�&�J�"�4�4���Y�y�3E�'E�F�L�!�$���QY�Z�K�� � �H��$�$�J����M�����J�!�$5�5�� �L��-�-�.��#/��5K�� �_�_�T�6�2�
����)�D�Z�)-�/�	0���A��L�
/�"�*�->�-?�"@�A����#/��5K�� �_�_�T�6�2�
����)�D�Z�)-�,4�V�,<�>�	?���A��L�B����J�&���%7�7�8�� �_�_�T�6�2�
����)�D�Z�)8�:�	;������!� �n�n�T�6�2�G� �_�_�T�6�2�
����)�D�Z�)6�,3�5�	6�
����N�*��.�.�����
�*��Q�J�E����� �_�_�T�6�2�
����)�D�Z�)5�7�	8�
�z�!,����6�!B�'7�9�9r�c��t|�r|Stt|�dt�}|tur|S|||t|��S)Nr�)rSr�rr�)�
descriptorr�rws   r�r�r��	sD���z����
�$�z�"�I�y�
9�C�
�i�����z�3��S�	�*�*r�)r�r�rrrsrtc	�b�	tjt||||||��}t|�st	dj|���t
|tj�r!||j�}|rt|�S|S|r0t|d���}t
|tj�r||�S	|j}|�s|}	t
|ttf�st|�r|�}t
|t�r
t|||�}t
|t�st	dj|	���|S	|j"}
t
|
tj$�r�||
j&�}t)||
d�}t+|j,j/��d}|j0t2j4ur|St+|j,j/��}
|f|
z}|j7|��St9|�st;|�rt=||||||�	�St?|�rtA|||�
�St
|tj�r||j&�}t)||�St
|tB��r7tEtC|�d�}|�||�StE|d�}tE|d
�}|jFD]F}|�'d|jHvr||�}|rt|�}|cS|��/d
|jHvs�>||�cS|jFddD] }	|jJ}|s�t|||�cStB|jFvr�|jLtNjLur1|jPtNjPur|jStN�StUdj|���tWtC|�dd�}|�tY||�}||�StUdj|���#t $rY���wxYw#t $rY��"wxYw#t $rY��wxYw)N)r�r�rrrsr�rtz{!r} is not a callable objectc�R�t|d�xst|tj�S)N�
__signature__)r�r~r�r�r�s r�r�z*_signature_from_callable.<locals>.<lambda>�	s'��'�!�_�*E�+C�#-�a��1A�1A�#B�+Cr�r#z1unexpected object {!r} in __signature__ attributer�rjr�)r�rrrsrt)r��__call__rpr�r4z(no signature found for builtin type {!r}z+callable {!r} is not supported by signature)-r�r�r�r�r�r)r~r�r�r�r�rhrWr$r�r?r��_partialmethod�
partialmethodr�r�rr�r�r r#r5r�rYr�rRr�rBrr�r"rvrAr�r�rp�
from_callabler�r4r�)r�r�r�rrrsrtr��_get_signature_ofr�o_sigrZr��first_wrapped_param�
sig_paramsr��call�new�initr��text_sigs                    r�r�r��	s#���"�)�)�*B�6K�/=�(/�'-�'-�)1�
3���C�=��7�>�>�s�C�D�D��#�u�'�'�(� ����-���*�3�/�/��J���S�!C�E���c�5�+�+�,�%�S�)�)�������?��E��c�I�s�#3�4��#���e���#�s�#�(���c�:���c�9�-�� � &��u�
�/�/��J�:��*�*�
��m�Y�%<�%<�=�,�M�,>�,>�?�K�(��m�W�M�C�"'��(>�(>�(E�(E�(G�"H��"K��"�'�'�9�+C�+C�C��
�"�3�>�>�#8�#8�#:�;�
�2�3�j�@�
��{�{�j�{�9�9��#��4�S�9�(���7E�07��QY�[�	[��S�!�&�v�s�6D�F�	F��#�y�(�(�)�'����1��%�k�3�7�7��#�t��
2�$�s�)�Z�H����$�T�*�*�0��i�@��1�#�z�B���K�K�D���9��
�
�#=�'��,��!�1�#�6�C��
��!�j�D�M�M�&A�(��.�.� ��K�K���$�D�
F��2�2���.�f�d�H�E�E�!%�*�s�{�{�"�������/����v�~�~�-��+�+�F�3�3� �>�E�E�c�J�L�L�
�d�3�i��T�:����"�4��-�D�$�T�*�*�
�B�I�I�#�N�
O�O��A�
��
��(�
��
��^"�
��
�s6�5P�7P�#P!�	P�
P�	P�P�!	P.�-P.c��eZdZy)r�Nr�r}r�r�r�r�s
s��;r�r�c��eZdZy)r&Nr�r}r�r�r&r&w
s��@r�r&c�,�eZdZdZdZdZdZdZd�Zd�Z	y)	�_ParameterKindzpositional-onlyzpositional or keywordzvariadic positionalr3zvariadic keywordc�x�t|j�}tj||�}||_||_|Sr�)r(�__members__r	rp�_value_�description)rrkr��members    r�rpz_ParameterKind.__new__�
s4���C�O�O�$�����S�%�(�����(����
r�c��|jSr�r r�s r��__str__z_ParameterKind.__str__�
s���y�y�r�N)
r�ryr5r2r3r5r6r8rprnr}r�r�rgrg{
s&��'�O�3��*�N�!�L�$�K��r�rgc��eZdZ	dZeZeZeZ	e
ZeZ
eZeed�d�Zd�Zd�Zed��Zed��Zed��Zed	��Zeeeed
�d�Zd�Zd
�Zd�Zd�Zy)r#)�_name�_kind�_default�_annotationr%c�d�	t|�|_|turJ|jtt
fvr2d}|j
|jj�}t|��||_||_	|turtd��t|t�s/dj
t|�j�}t|��|ddk(rw|ddj�rd|jt k7r2d	}|j
|jj�}t|��t"|_d
j
|dd�}t%|�xr|jt"u}|s|j'�stdj
|���||_y#t$rtd|�d���wxYw)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 {}rjr3rDzLimplicit arguments must be passed as positional or keyword arguments, not {}z
implicit{}z"{!r} is not a valid parameter name)rgrqr�r&rrr)rkrrrsr~r�rr�r��isdigitrrrk�isidentifierrp)r>r�r rrr��
is_keywords       r�r�zParameter.__init__�
s���	N�'��-�D�J��&� ��z�z�o�|�<�<�@���j�j����!7�!7�8�� ��o�%���
�%����6�>��I�J�J��$��$�0�7�7��T�
�8K�8K�L�C��C�.� ���7�c�>�d�1�2�h�.�.�0�
�z�z�3�3�>���j�j����!7�!7�8�� ��o�%�)�D�J��&�&�t�A�B�x�0�D��t�_�K����;K�)K�
��T�.�.�0��A�H�H��N�O�O���
��M�	N��v�d�X�-K�L�M�M�	N�s�F�F/c�x�t|�|j|jf|j|jd�fS)N�rrrs)rrprqrrrsr�s r��
__reduce__zParameter.__reduce__�
s8���T�
����T�Z�Z�(�!�]�]� $� 0� 0�2�3�	3r�c�,�|d|_|d|_y)Nrrrsry�r>�states  r��__setstate__zParameter.__setstate__�
s���j�)��
� ��/��r�c��|jSr�)rpr�s r�r�zParameter.name�
����z�z�r�c��|jSr�)rrr�s r�rzParameter.default�
s���}�}�r�c��|jSr�)rsr�s r�rzParameter.annotation�
������r�c��|jSr�)rqr�s r�r zParameter.kind�
r�r�)r�r rrc���	|tur|j}|tur|j}|tur|j}|tur|j}t|�||||��S)Nr%)r�rprqrsrrr)r>r�r rrs     r�r�zParameter.replace�
s`��9��5�=��:�:�D��5�=��:�:�D�����)�)�J��e���m�m�G��t�D�z�$��g�*�M�Mr�c��|j}|j}|jtur%dj	|t|j��}|jtur]|jtur&dj	|t|j��}n%dj	|t|j��}|tk(rd|z}|S|tk(rd|z}|S)Nz{}: {}z{} = {}z{}={}rr")
r rprsr&r)r+rrrrr)r>r �	formatteds   r�rnzParameter.__str__
s����y�y���J�J�	����6�)� ���	�'7��8H�8H�'I�K�I��=�=��&����v�-�%�,�,�Y��T�]�]�8K�L�	�#�N�N�9�d�4�=�=�6I�J�	��?�"��i��I����\�
!��y�(�I��r�c�N�dj|jj|�S)Nz	<{} "{}">�r)r<r�r�s r�rvzParameter.__repr__ s���!�!�$�.�.�"9�"9�4�@�@r�c�p�t|j|j|j|jf�Sr�)�hashrprqrsrrr�s r��__hash__zParameter.__hash__#s(���T�Z�Z����T�-=�-=�t�}�}�M�N�Nr�c��||uryt|t�stS|j|jk(xrO|j|jk(xr4|j
|j
k(xr|j|jk(S�NT)r~r#�NotImplementedrprqrrrs�r>�others  r��__eq__zParameter.__eq__&sv���5�=���%��+�!�!��
�
�e�k�k�)�6��
�
�e�k�k�)�6��
�
����/�6�� � �E�$5�$5�5�	7r�N)r�ryr5r9rr2rr3rr5rr6rr8r&r�r�rzr~rr�rrr r�r�rnrvr�r�r}r�r�r#r#�
s����*>�I�.�O�4��-�N�+�L�*�K��E�.4��)�V3�0���������� �� �����$�%� �%�N�$�,A�O�7r�r#c�f�eZdZ	dZd�Zed��Zed��Zed��Zd�Z	d�Z
d�Zd	�Zd
�Z
y)r
)r��
_signature�__weakref__c� �||_||_yr�)r�r�)r>rer�s   r�r�zBoundArguments.__init__Ds��"���#��r�c��|jSr�)r�r�s r�rezBoundArguments.signatureHs�����r�c�|�g}|jjj�D]o\}}|jtt
fvrt|�S	|j|}|jtk(r|j|��_|j|��qt|�S#t$rYt|�SwxYwr�)r�r�r�r rrr�r�extendr�r_r)r>r�r�r�rAs     r�r�zBoundArguments.argsLs�����!%���!;�!;�!A�!A�!C��J���z�z�l�M�:�:�� �T�{��
%��n�n�Z�0���:�:��0��K�K��$��K�K��$�!"D�$�T�{����
���T�{��
�s�B$�$	B;�:B;c�Z�i}d}|jjj�D]p\}}|s,|jtt
fvrd}n||jvrd}�4|s�7	|j|}|jtk(r|j|��l|||<�r|S#t$rY��wxYw)NFT)	r�r�r�r rrr��updater_)r>�kwargs�kwargs_startedr�r�rAs      r�r�zBoundArguments.kwargscs�������!%���!;�!;�!A�!A�!C��J��!��:�:�,�
�!>�>�%)�N�!����7�)-�� �!��

-��n�n�Z�0���:�:��-��M�M�#�&�*-�F�:�&�-"D�0�
���
��
�s�!B�	B*�)B*c��	|j}g}|jjj�D]\}}	|j	|||f��t|�|_y#t
$ra|jtur
|j}n,|jturd}n|jturi}nY��|j	||f�Y��wxYw)Nr})r�r�r�r�r�r_rr&r rrr�)r>r��
new_argumentsr�r��vals      r��apply_defaultszBoundArguments.apply_defaults�s���	��N�N�	��
��?�?�5�5�;�;�=�K�D�%�

2��$�$�d�I�d�O�%<�=�>��m�,�����
2��=�=��.��-�-�C��Z�Z�?�2��C��Z�Z�<�/��C���$�$�d�C�[�1�
2�s�A$�$AC�8C�
Cc��||uryt|t�stS|j|jk(xr|j|jk(Sr�)r~r
r�rer�r�s  r�r�zBoundArguments.__eq__�sF���5�=���%��0�!�!����%�/�/�1�2����%�/�/�1�	3r�c�,�|d|_|d|_y)Nr�r��r�r�r|s  r�r~zBoundArguments.__setstate__�s����-����{�+��r�c�4�|j|jd�S)Nr�r�r�s r��__getstate__zBoundArguments.__getstate__�s��"�o�o�D�N�N�K�Kr�c��g}|jj�D]&\}}|jdj||���(dj|jj
dj
|��S)Nz{}={!r}z	<{} ({})>r+)r�r�r�r)r<r�rI)r>r�rAr�s    r�rvzBoundArguments.__repr__�s`�����.�.�.�.�0�J�C���K�K�	�(�(��e�4�5�1��!�!�$�.�.�"9�"9�4�9�9�T�?�K�Kr�N)r�ryr5r9r�rrer�r�r�r�r~r�rvr}r�r�r
r
1sj��� ;�I�$���������,����:-�83�,�L�Lr�r
c��eZdZ	dZeZeZeZ	dedd�d�Z
eddddd�d��Ze
d	��Ze
d
��Zeed�d�Zd
�Zd�Zd�Zdd�d�Zd�Zd�Zd�Zd�Zd�Zd�Zy)r$)�_return_annotation�_parametersNTrDc��	|�t�}n�|r�t�}t}d}|D]�}|j}|j}	||kr3d}
|
j	|j
|j
�}
t
|
��||kDr|}|ttfvr#|jtur|rd}
t
|
��d}|	|vrdj	|	�}
t
|
��|||	<��ntd�|D��}tj|�|_||_
y)NFz7wrong parameter order: {} parameter before {} parameterz-non-default argument follows default argumentTzduplicate parameter name: {!r}c3�8K�|]}|j|f���y�wr�r �rr�s  r�r	z%Signature.__init__.<locals>.<genexpr>s����$Q�j�U�e�j�j�%�%8�j�s�)rnrr r�r)rkr�rrr&r��MappingProxyTyper�r�)r>r�r�rEr��top_kind�seen_defaultr�r r�r�s           r�r�zSignature.__init__�s��	��� �]�F�&�$���+��$��'�E� �:�:�D� �:�:�D��h��(��"�j�j��)=�)=�)-�)9�)9�;��(��o�-����#'��� 0�2H�I�I� �=�=�F�2�+�'1��&0��o� 5�,0�L��v�~�>�E�E�d�K��(��o�-�#(�F�4�L�?(�B%�$Q�j�$Q�Q�� �1�1�&�9���"3��r�F��follow_wrappedrrrsrtc�&�	t||||||��S)N)r�r�rrrsrt)r�)rr�r�rrrsrts      r�r[zSignature.from_callables&��	B�'��C�>L�07��QY�[�	[r�c��|jSr�)r�r�s r�r�zSignature.parameters
r�r�c��|jSr��r�r�s r�r�zSignature.return_annotations���&�&�&r�)r�r�c��	|tur|jj�}|tur|j}t	|�||��S)Nr+)r�r�r�r�r)r>r�r�s   r�r�zSignature.replacesO��	�
������/�/�1�J���%� $� 7� 7���t�D�z�*�,=�?�	?r�c��td�|jj�D��}|jj�D�cic]"}|jtk(r
|j
|��$}}|||jfScc}w)Nc3�FK�|]}|jtk7r|���y�wr�)r rr�s  r�r	z(Signature._hash_basis.<locals>.<genexpr>%s$����=�*B�� %�
�
�m� ;��*B�s�!)rr�r�r rr�r�)r>r�r��
kwo_paramss    r��_hash_basiszSignature._hash_basis$s����=�$�/�/�*@�*@�*B�=�=��6:�_�_�5K�5K�5M�H�5M�E�+0�:�:��+F��j�j�%�'�5M�
�H��z�4�#9�#9�9�9��Hs�'A?c�x�|j�\}}}t|j��}t|||f�Sr�)r��	frozensetr�r�)r>r�r�r�s    r�r�zSignature.__hash__-s>��04�0@�0@�0B�-��
�-��z�0�0�2�3�
��V�Z�):�;�<�<r�c�z�||uryt|t�stS|j�|j�k(Sr�)r~r$r�r�r�s  r�r�zSignature.__eq__2s9���5�=���%��+�!�!����!�U�%6�%6�%8�8�8r��r�c	��	i}t|jj��}d}t|�}g}		t|�}		t|�}
|
jt
tfvrtd�d�|
jtk(r-|	g}|j|�t|�||
j<nW|
j|vr9|
jtk7r&tdj|
j���d�|	||
j<��d}t%j&||�D]O}
|
jt
k(r|
}�|
jtk(r�-|
j}	|j)|�}	|	||<�Q|rr|�|||j<n`|r1td
jdj-d�|D������td
jtt|������|j/||�S#t$r
td�d�wxYw#t$r�	t|�}
|
jtk(rY��4|
j|vr-|
jtk(r|j|
�Y��=|
f}Y��o|
jt
k(s|
j t"ur|
f}Y���|r|
f}Y���|
jtk(rd}nd}d}
|
j|
j|��}
t|
�d�#t$rYY���wxYwwxYw#t*$rG|sA|
jtk7r.|
j t"urtd	j|���d�Y��1wxYw)Nr}ztoo many positional argumentsz$multiple values for argument {arg!r})rAz
 keyword-onlyr�z-missing a required{argtype} argument: {arg!r})rA�argtypez$missing a required argument: {arg!r}zGgot some positional-only arguments passed as keyword arguments: {arg!r}r+c3�4K�|]}|j���y�wr�r r�s  r�r	z"Signature._bind.<locals>.<genexpr>�s����&�)A��"�J�J�)A�s�z*got an unexpected keyword argument {arg!r})r�r�r�r�r rrr�rr�rr�rr)�
StopIterationr�rr&r�r0rHr_rI�_bound_arguments_cls)r>r�r�r�r�r��
parameters_ex�arg_vals�pos_only_param_in_kwargs�arg_valr�r�r�r��kwargs_paramr�s                r��_bindzSignature._bind9sz��1��	��$�/�/�0�0�2�3�
��
���:��#%� ��G
4��x�.��Z4� ��,�E��z�z�l�M�%B�B�(�;�=�BF�G��z�z�_�4�#*����
�
�h�/�05�f�
�	�%�*�*�-���z�z�V�+��
�
�>N�0N�'�B�I�I�$)�J�J�J�0�1�6:�;�-4�I�e�j�j�)�U�\���_�_�]�J�?�E��z�z�\�)�$����z�z�_�,�����J�

0� �*�*�Z�0��)0�	�*�%�5@�8��'�/5�	�,�+�+�,�)��1�17�� �I�I�&�)A�&��28�2��� �@�G�G� ��f��.�H�0�1�1��(�(��y�9�9��W%�O�#�$C�D�$�N�O��]!�)
;�';� ��,�E��z�z�_�4�����v�-� �:�:�)9�9�5�;�;�E�B�$�).��
���*�*��4�05�
�
�V�0K�*/��
��#�-2�H�M�!�$�z�z�]�:�*9��*,��"Q�C�"%�*�*����W�*�"M�C�"+�C�.�d�:��K%�����	)
;��r�
F�
 �E�J�J�/�$A�49�M�M�V�4K�#�$J�$*�F�z�F�$:�<�AE�F��
F�sm�H�G:�L�:H�	L�K/�(L�>2L�3L�9(L�$L�,AL�/	K=�8L�<K=�=L�AM�Mc�(�	|j||�Sr��r��r>r�r�s   r��bindzSignature.bind�s��	��z�z�$��'�'r�c�,�	|j||d��S)NTr�r�r�s   r�r�zSignature.bind_partial�s��	��z�z�$���z�5�5r�c�z�t|�t|jj��fd|jifS�Nr�)rrr�r�r�r�s r�rzzSignature.__reduce__�s=���T�
��t�'�'�.�.�0�1�3�%�t�'>�'>�?�A�	Ar�c��|d|_yr�r�r|s  r�r~zSignature.__setstate__�s��"'�(<�"=��r�c�N�dj|jj|�S)Nz<{} {}>r�r�s r�rvzSignature.__repr__�s�������� 7� 7��>�>r�c��g}d}d}|jj�D]u}t|�}|j}|tk(rd}n|r|jd�d}|tk(rd}n|tk(r|r|jd�d}|j|��w|r|jd�djdj|��}|jtur)t|j�}|dj|�z
}|S)NFT�/rz({})r+z -> {})
r�r�r�r rr�rrr)rIr�r&r+)	r>r�render_pos_only_separator�render_kw_only_separatorr�r�r �rendered�annos	         r�rnzSignature.__str__�s�����$)�!�#'� ��_�_�+�+�-�E��E�
�I��:�:�D��'�'�,0�)�*��
�
�c�"�,1�)���&�,1�(���&�+C��
�
�c�"�,1�(��M�M�)�$�5.�8%�
�M�M�#���=�=����6�!2�3���!�!��/�#�D�$:�$:�;�D������-�-�H��r�r�)r�ryr5r9r#r,r
r�r&r�r�rr[rr�r�r�r�r�r�r�r�r�r�rzr~rvrnr}r�r�r$r$�s����,6�I��N�)���E�24�V�)-�24�h�%)�4��u�[��[�� �� ��'��'�%*�U�
?�:�=�
9�.3�I:�V(�6�A�
>�?�+r�r$r�c�8�	tj|||||��S)Nr�)r$r[)r�r�rrrsrts     r�rere
s*��9��"�"�3�~�+2�6�H�#�V�Vr�c��eZdZdZdZdZdZdezZdezZdezZ	dezZ
d	ezZeezZeZ
eezZeZeezezZeezZeezezZeezZd	Zd
Zy)rrjrD���� �@��iN)r�ryr5�SIMPLE�WRITABLE�FORMAT�ND�STRIDES�C_CONTIGUOUS�F_CONTIGUOUS�ANY_CONTIGUOUS�INDIRECT�CONTIG�	CONTIG_RO�STRIDED�
STRIDED_RO�RECORDS�
RECORDS_RO�FULL�FULL_RO�READ�WRITEr}r�r�rr
s���
�F��H�
�F�	�B��R�i�G��'�>�L��'�>�L��G�^�N��w��H�
�(�]�F��I��� �G��J��� �6�)�G��6�!�J��h���'�D����G��D��Er�rc�"�	ddl}ddl}|j�}|jdd��|jdddd�	�|j	�}|j
}|j
d
�\}}}	|j|�x}}	|r&|j!d�}	}|D]}
t#||
�}�	jtj$vr0tdtj��tjd�|j&r�tdj|��tdjt)|	���tdj|	j*��|	ur^tdjt-|	j.���t1|	d�rNtdj|	j2��n)	t5|�\}}tdj|��td�ytt7��y#t$ra}
dj|t|
�j|
�}t|tj��tjd
�Yd}
~
���d}
~
wwxYw#t$rY��wxYw)Nrjr�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)�actionr��:zFailed to import {} ({}: {}))r�r�r3z#Can't get info for builtin modules.rDz
Target: {}z
Origin: {}z
Cached: {}z
Loader: {}�__path__zSubmodule search path: {}zLine: {}rC)�argparser\�ArgumentParser�add_argument�
parse_argsr��	partition�
import_modulerr)rr��printr��stderr�exitr6r��builtin_module_names�detailsrK�
__cached__rrlr�r�r*rJ)r�r\�parserr��target�mod_name�	has_attrs�attrsr�r�r�r��parts�part�__r�s                r��_mainr'
s-��@���
�
$�
$�
&�F�
����9��:�����k�,�
H��J�����D�
�[�[�F�!'�!1�!1�#�!6��H�i���.�y�.�.�x�8�8��f�����C� �����D��#�t�$�C�����#�2�2�2�
�3�#�*�*�E�������|�|�
�l�!�!�&�)�*�
�l�!�!�-��"7�8�9�
�l�!�!�&�"3�"3�4�5��&�=��,�%�%�d�6�+<�+<�&=�>�?��v�z�*��1�8�8����I�J�
1�'��_�
��F��j�'�'��/�0�
�d��
�i��n���G��,�3�3�H�48��I�4F�4F�47�9��	�c��
�
�#����������8�
��
�s+�4H�J�	I?�AI:�:I?�	J�
JrRr�)F)rD)r})T)TNNF)��
__author__�__all__r�r�r��collections.abcr��enum�importlib.machineryr\r�rurYr�r�r�r�r�r�r~�keywordrk�operatorrlrmrn�weakrefror�rr�mod_dict�COMPILER_FLAG_NAMESr�r�rr%r.rarSr^r_rWr�r]r\rYr�r[r�r�r�rdrVrPrOrZrUrQrcrXrTrRr`rbrNrrDrErr'rHrhrMr7r@r<r(r=rGrKr/rr�rFrr�NodeVisitorr�r*r9rr	r5rLrJrir7rr0rr?rr1r+r,r�r-r9rEr6rr8rir&rr|r>rC�_fieldsr�rrIrBr)rfrgr�rrvr�r�r�r�r��	lru_cacher�r�r4r r!r"rrAr@r
rrrr;r:rrrrr3r2�WrapperDescriptorTyper�rr�r�r�r�r�r�r�rr?rBrRr�r�r�r&�IntEnumrgr2rr3rr5rr6rr8rr#r
r$re�IntFlagrrr�r}r�r��<module>r!s7���@9�
�i��X�
�
������	�	�
��������/�'��9���#�#�)�)�+�D�A�q��H�U�Q�Y��
,��q�(���%)���v�t0�$�0�A�(?��5�(�)�>���5�(�)�>��2�	,�-��X��J��I�3�8�3�"3�;�3�/�.�29�7�(��0(�T3�
:�
�{�$E�F�	�p�h���@0�
�<�|�& �:,�8
��28��
���,�^	�)�	��3�?�?��>B0�H+%�Z"��!�4�4�l$�&0�*��+�6
�{�$:�;�	�8�6��M�O��Z<�z�Y� >�
?��9���"�"9� 8� ?�	(�.7� D�*:�x��(L�M��14�j��&S�
T�
�
-�
�
-�7�O�)A�V�
��j�9�3D�3D�&D�
E�
�
@�
�
@���C�5�'�
�H�	����y�)�1�1�� �M�M�*�5�=�=��4����������$
�'0�/�h�����
�
�
��$�&����!�����$
�����!�����$�."�7�7�!�3�3�!�;�;�!�5�5�7���$I?�X*�4*�G�2/+�dK8�\
<� 8<�AF�\9�~+�48�,0�%)�$(�&+�oP�d<�<�A�A��T�\�\��"*�9�9��)�?�?��)�8�8��)�6�6�
�)�5�5��[7�[7�|L�L�DU�U�p
&*�4��u�V��$�,�,��,7�t�z��	�G�r�