AlkantarClanX12

Your IP : 3.133.107.11


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

o

6��f���@s�dZdZddlZddlZddlZddlZddlZddlZ	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlmZddlmZmZe�Zej��D]
\ZZeede<q^dZdddd	�d
d�Z dd
�Z!dd�Z"dd�Z#dd�Z$dd�Z%e&ed�r�dd�Z'ndd�Z'e&ed�r�dd�Z(ndd�Z(dd�Z)d d!�Z*d"d#�Z+d$d%�Z,d&d'�Z-d(d)�Z.d*d+�Z/d,d-�Z0d.d/�Z1d0d1�Z2d2d3�Z3d4d5�Z4d6d7�Z5d8d9�Z6d:d;�Z7d�d<d=�Z8ed>d?�Z9d@dA�Z:dBdC�Z;ddD�dEdF�Z<dGdH�Z=dIdJ�Z>dKdL�Z?dMdN�Z@dOdP�ZAdQdR�ZBdSdT�ZCdUdV�ZDd�dWdX�ZEiZFiZGd�dYdZ�ZHGd[d\�d\eI�ZJGd]d^�d^ejK�ZLd_d`�ZMdadb�ZNGdcdd�ddeI�ZOGdedf�df�ZPdgdh�ZQdidj�ZRdkdl�ZSdmdn�ZTd�dodp�ZUedqdr�ZVdsdt�ZWedudv�ZXdwdx�ZYedydz�ZZd{d|�Z[ed}d~�Z\dd��Z]d�d�d��Z^d�d��Z_dddd�iie`d�d��d�d��d�d��d�d��e^fd�d��Zae`d�d��d�d��d�d��fd�d��Zbd�d��Zcd�d��Zdd�d��Zeed�d��Zfd�d��Zged�d��Zhd�d�d��Zid�d��Zjed�d�ehjk�Zld�d�d��Zmd�d�d��Znd�d��Zod�d�d��Zpd�d�d��Zqer�Zsd�d��Ztd�d��Zud�d��Zvd�d��Zwd�d��Zxesfd�d��Zyd�Zzd�Z{d�Z|d�Z}d�d��Z~d�d„Zd�Z�d�Z�d�Z�d�Z�d�dȄ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�	�	�dd�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(aFGet useful information from live Python objects.

This module encapsulates the interface provided by the internal special
attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion.
It also provides some help for examining source code and class layout.

Here are some of the useful functions provided by this module:

    ismodule(), isclass(), ismethod(), isfunction(), isgeneratorfunction(),
        isgenerator(), istraceback(), isframe(), iscode(), isbuiltin(),
        isroutine() - check object types
    getmembers() - get members of an object that satisfy a given condition

    getfile(), getsourcefile(), getsource() - find an object's source code
    getdoc(), getcomments() - get documentation on an object
    getmodule() - determine the module that an object came from
    getclasstree() - arrange classes so as to represent their hierarchy

    getargvalues(), getcallargs() - get info about function arguments
    getfullargspec() - same, with support for Python 3 features
    formatargvalues() - format an argument spec
    getouterframes(), getinnerframes() - get info about frames
    currentframe() - get the current stack frame
    stack(), trace() - get info about frames on the stack or in a traceback

    signature() - get a Signature object for the callable

    get_annotations() - safely compute an object's annotations
)zKa-Ping Yee <ping@lfw.org>z'Yury Selivanov <yselivanov@sprymix.com>�N)�
attrgetter)�
namedtuple�OrderedDictZCO_iF��globals�locals�eval_strcs�t|t�rEt|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|�rpt|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�|	���fdd�|��D�}|S)
a�Compute the annotations dict for an object.

    obj may be a callable, class, or module.
    Passing in an object of any other type raises TypeError.

    Returns a dict.  get_annotations() returns a new dict every time
    it's called; calling it twice on the same object will return two
    different but equivalent dicts.

    This function handles several details for you:

      * If eval_str is true, values of type str will
        be un-stringized using eval().  This is intended
        for use with stringized annotations
        ("from __future__ import annotations").
      * If obj doesn't have an annotations dict, returns an
        empty dict.  (Functions and methods always have an
        annotations dict; classes, modules, and other types of
        callables may not.)
      * Ignores inherited annotations on classes.  If a class
        doesn't have its own annotations dict, returns an empty dict.
      * All accesses to object members and dict values are done
        using getattr() and dict.get() for safety.
      * Always, always, always returns a freshly-created dict.

    eval_str controls whether or not values of type str are replaced
    with the result of calling eval() on those values:

      * If eval_str is true, eval() is called on values of type str.
      * If eval_str is false (the default), values of type str are unchanged.

    globals and locals are passed in to eval(); see the documentation
    for eval() for more information.  If either globals or locals is
    None, this function may replace that value with a context-specific
    default, contingent on type(obj):

      * If obj is a module, globals defaults to obj.__dict__.
      * If obj is a class, globals defaults to
        sys.modules[obj.__module__].__dict__ and locals
        defaults to the obj class namespace.
      * If obj is a callable, globals defaults to obj.__globals__,
        although if obj is a wrapped function (using
        functools.update_wrapper()) it is first unwrapped.
    �__dict__N�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_annotationsBsl
-�



�r/cC�t|tj�S)z�Return true if the object is a module.

    Module objects provide these attributes:
        __cached__      pathname to byte compiled file
        __doc__         documentation string
        __file__        filename (missing for built-in modules))rrr"��objectrrr�ismodule��r3cC�
t|t�S)z�Return true if the object is a class.

    Class objects provide these attributes:
        __doc__         documentation string
        __module__      name of module in which this class was defined)rrr1rrr�isclass��
r6cCr0)a_Return true if the object is an instance method.

    Instance method objects provide these attributes:
        __doc__         documentation string
        __name__        name with which this method was defined
        __func__        function object containing implementation of method
        __self__        instance to which this method is bound)rr�
MethodTyper1rrr�ismethod��r9cCs:t|�st|�st|�rdSt|�}t|d�ot|d�S)a�Return true if the object is a method descriptor.

    But not if ismethod() or isclass() or isfunction() are true.

    This is new in Python 2.2, and, for example, is true of int.__add__.
    An object passing this test has a __get__ attribute but not a __set__
    attribute, but beyond that the set of attributes varies.  __name__ is
    usually sensible, and __doc__ often is.

    Methods implemented via descriptors that also pass one of the other
    tests return false from the ismethoddescriptor() test, simply because
    the other tests promise more -- you can, e.g., count on having the
    __func__ attribute (etc) when an object passes ismethod().F�__get__�__set__�r6r9�
isfunctionrr�r2�tprrr�ismethoddescriptor�srAcCs8t|�st|�st|�rdSt|�}t|d�pt|d�S)a}Return true if the object is a data descriptor.

    Data descriptors have a __set__ or a __delete__ attribute.  Examples are
    properties (defined in Python) and getsets and members (defined in C).
    Typically, data descriptors will also have __name__ and __doc__ attributes
    (properties, getsets, and members have both of these attributes), but this
    is not guaranteed.Fr<�
__delete__r=r?rrr�isdatadescriptor�srC�MemberDescriptorTypecCr0)��Return true if the object is a member descriptor.

        Member descriptors are specialized descriptors defined in extension
        modules.)rrrDr1rrr�ismemberdescriptor��rFcC�dS)rEFrr1rrrrF��rcCr0)��Return true if the object is a getset descriptor.

        getset descriptors are specialized descriptors defined in extension
        modules.)rrrr1rrr�isgetsetdescriptorrGrKcCrH)rJFrr1rrrrKrIcCr0)a(Return true if the object is a user-defined function.

    Function objects provide these attributes:
        __doc__         documentation string
        __name__        name with which this function was defined
        __code__        code object containing compiled function bytecode
        __defaults__    tuple of any default values for arguments
        __globals__     global namespace in which this function was defined
        __annotations__ dict of parameter annotations
        __kwdefaults__  dict of keyword only parameters with defaults)rr�FunctionTyper1rrrr>sr>cCsDt|�r|j}t|�st�|�}t|�st|�sdSt|jj|@�S)z�Return true if ``f`` is a function (or a method or functools.partial
    wrapper wrapping a function) whose code object has the given ``flag``
    set in its flags.F)	r9�__func__r&�_unwrap_partialr>�_signature_is_functionlike�bool�__code__�co_flags)�f�flagrrr�_has_code_flag"s�
rUcCr5)z�Return true if the object is a user-defined generator function.

    Generator function objects provide the same attributes as functions.
    See help(isfunction) for a list of attributes.)rUZCO_GENERATOR�r*rrr�isgeneratorfunction-�
rWcCr5)zuReturn true if the object is a coroutine function.

    Coroutine functions are defined with "async def" syntax.
    )rUZCO_COROUTINErVrrr�iscoroutinefunction4rXrYcCr5)z�Return true if the object is an asynchronous generator function.

    Asynchronous generator functions are defined with "async def"
    syntax and have "yield" expressions in their body.
    )rUZCO_ASYNC_GENERATORrVrrr�isasyncgenfunction;r7rZcCr0)z7Return true if the object is an asynchronous generator.)rr�AsyncGeneratorTyper1rrr�
isasyncgenC�r\cCr0)aReturn true if the object is a generator.

    Generator objects provide these attributes:
        __iter__        defined to support iteration over container
        close           raises a new GeneratorExit exception inside the
                        generator to terminate the iteration
        gi_code         code object
        gi_frame        frame object or possibly None once the generator has
                        been exhausted
        gi_running      set to 1 when generator is executing, 0 otherwise
        next            return the next item from the container
        send            resumes the generator and "sends" a value that becomes
                        the result of the current yield-expression
        throw           used to raise an exception inside the generator)rr�
GeneratorTyper1rrr�isgeneratorGsr_cCr0)z)Return true if the object is a coroutine.)rr�
CoroutineTyper1rrr�iscoroutineXr]racCs6t|tj�pt|tj�ot|jjt@�pt|tj	j
�S)z?Return true if object can be passed to an ``await`` expression.)rrr`r^rP�gi_coderRZCO_ITERABLE_COROUTINE�collections�abc�	Awaitabler1rrr�isawaitable\s��rfcCr0)abReturn true if the object is a traceback.

    Traceback objects provide these attributes:
        tb_frame        frame object at this level
        tb_lasti        index of last attempted instruction in bytecode
        tb_lineno       current line number in Python source code
        tb_next         next inner traceback object (called by this level))rr�
TracebackTyper1rrr�istracebackcr:rhcCr0)a`Return true if the object is a frame object.

    Frame objects provide these attributes:
        f_back          next outer frame object (this frame's caller)
        f_builtins      built-in namespace seen by this frame
        f_code          code object being executed in this frame
        f_globals       global namespace seen by this frame
        f_lasti         index of last attempted instruction in bytecode
        f_lineno        current line number in Python source code
        f_locals        local namespace seen by this frame
        f_trace         tracing function for this frame, or None)rr�	FrameTyper1rrr�isframemsrjcCr0)a�Return true if the object is a code object.

    Code objects provide these attributes:
        co_argcount         number of arguments (not including *, ** args
                            or keyword only arguments)
        co_code             string of raw compiled bytecode
        co_cellvars         tuple of names of cell variables
        co_consts           tuple of constants used in the bytecode
        co_filename         name of file in which this code object was created
        co_firstlineno      number of first line in Python source code
        co_flags            bitmap: 1=optimized | 2=newlocals | 4=*arg | 8=**arg
                            | 16=nested | 32=generator | 64=nofree | 128=coroutine
                            | 256=iterable_coroutine | 512=async_generator
        co_freevars         tuple of names of free variables
        co_posonlyargcount  number of positional only arguments
        co_kwonlyargcount   number of keyword only arguments (not including ** arg)
        co_lnotab           encoded mapping of line numbers to bytecode indices
        co_name             name with which this code object was defined
        co_names            tuple of names other than arguments and function locals
        co_nlocals          number of local variables
        co_stacksize        virtual machine stack space required
        co_varnames         tuple of names of arguments and local variables)rr�CodeTyper1rrr�iscode{srlcCr0)a,Return true if the object is a built-in function or method.

    Built-in functions and methods provide these attributes:
        __doc__         documentation string
        __name__        original name of this function or method
        __self__        instance to which a method is bound, or None)rr�BuiltinFunctionTyper1rrr�	isbuiltin�r4rncCs t|�pt|�pt|�pt|�S)z<Return true if the object is any kind of function or method.)rnr>r9rAr1rrr�	isroutine�s���rocCs�t|t�sdS|jt@rdStt|�tj�sdSt|d�rdS|j�	�D]
\}}t
|dd�r1dSq$|jD]}t
|dd�D]}t
||d�}t
|dd�rOdSq=q5dS)z:Return true if the object is an abstract base class (ABC).FT�__abstractmethods__�__isabstractmethod__rN)rr�	__flags__�TPFLAGS_IS_ABSTRACT�
issubclassrd�ABCMetarr	r)r�	__bases__)r2�namer�baserrr�
isabstract�s(


�
��ryc	Cst|�r|ft|�}nd}g}t�}t|�}z|jD]}|j��D]\}}t|tj	�r1|�
|�q"qWn	ty=Ynw|D]>}	z
t||	�}
|	|vrNt�Wntyk|D]}|	|jvrf|j|	}
nqXYq@Ynw|rr||
�ry|�
|	|
f�|�
|	�q@|jdd�d�|S)z�Return all members of an object as (name, value) pairs sorted by name.
    Optionally, only return members that satisfy a given predicate.rcSs|dS)Nrr)Zpairrrr�<lambda>��zgetmembers.<locals>.<lambda>�r)r6�getmro�set�dirrvr	r)rr�DynamicClassAttribute�append�AttributeErrorr�add�sort)r2Z	predicate�mro�results�	processed�namesrx�k�vrrrrr�
getmembers�sJ

����
�

���	r��	Attributezname kind defining_class objectcCs4t|�}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ys}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�qF|
dur�|
n|}t|ttjf�r�d}|}n!t|ttjf�r�d}|}nt|t�r�d	}|}n
t|��rd
}nd}|	�
t||||��|
�|�qF|	S)aNReturn list of attribute-descriptor tuples.

    For each name in dir(cls), the return list contains a 4-tuple
    with these elements:

        0. The name (a string).

        1. The kind of attribute this is, one of these strings:
               'class method'    created via classmethod()
               'static method'   created via staticmethod()
               'property'        created via property()
               'method'          any other flavor of method or descriptor
               'data'            not a method

        2. The class which defined this attribute (a class).

        3. The object as obtained by calling getattr; if this fails, or if the
           resulting object does not live anywhere in the class' mro (including
           metaclasses) then the object is looked up in the defining class's
           dict (found by walking the mro).

    If one of the items in dir(cls) is stored in the metaclass it will now
    be discovered and not have None be listed as the class in which it was
    defined.  Any items whose home class cannot be discovered are skipped.
    css �|]}|ttfvr|VqdS�N)rr2)r�clsrrr�	<genexpr>s�z'classify_class_attrs.<locals>.<genexpr>Nr	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�|jS)zHReturn tuple of base classes (including cls) in method resolution order.)�__mro__)r�rrrr}^�r}��stopcs��dur	dd�}n�fdd�}|}t|�|i}t��}||�r?|j}t|�}||vs0t|�|kr7td�|���|||<||�s|S)anGet the object wrapped by *func*.

   Follows the chain of :attr:`__wrapped__` attributes returning the last
   object in the chain.

   *stop* is an optional callback accepting an object in the wrapper chain
   as its sole argument that allows the unwrapping to be terminated early if
   the callback returns a true value. If the callback never returns a true
   value, the last object in the chain is returned as usual. For example,
   :func:`signature` uses this to stop unwrapping if any object in the
   chain has a ``__signature__`` attribute defined.

   :exc:`ValueError` is raised if a cycle is encountered.

    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|���S)zBReturn the indent size, in spaces, at the start of a line of text.)�
expandtabsr��lstrip)�lineZexplinerrr�
indentsize�sr�cCsNtj�|j�}|dur
dS|j�d�dd�D]}t||�}qt|�s%dS|S)N�.���)rrr
r�__qualname__�splitrr6)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__)r6r�r2�__doc__r�r9rM�__name__�__self__r�	__class__r>r�rnr�rr�r�rArCr�rFr )r*rx�docrw�selfr�r(�slotsrrr�_finddoc�sx

���
��
��r�c	Csdz|j}Wn
tyYdSw|dur'zt|�}Wnttfy&YdSwt|t�s.dSt|�S)z�Get the documentation string for an object.

    All tabs are expanded to spaces.  To clean up docstrings that are
    indented to line up with blocks of code, any whitespace than can be
    uniformly removed from the second line onwards is removed.N)r�r�r�r$rr�cleandoc)r2r�rrr�getdoc�s
��
r�cCs�z	|���d�}Wn
tyYdSwtj}|dd�D]}t|���}|r2t|�|}t||�}q|r=|d��|d<|tjkrVtdt|��D]}|||d�||<qI|rf|dsf|�	�|rf|dr\|rw|dsw|�	d�|rw|drld�
|�S)z�Clean up indentation from docstrings.

    Any whitespace that can be uniformly removed from the second line
    onwards is removed.�
N�rr�)r�r��UnicodeErrorr�maxsizer�r��min�range�pop�join)r��linesZmarginr�Zcontent�indent�irrrr��s.�
�
(�
�
r�cCs�t|�rt|dd�r
|jStd�|���t|�r=t|d�r6tj�	|j
�}t|dd�r-|jS|j
dkr6td��td�|���t|�rD|j
}t|�rK|j}t|�rR|j}t|�rY|j}t|�r`|jStd�t|�j���)	z@Work out which source or compiled file an object was defined in.�__file__Nz{!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 {})r3rr�r$r�r6rrrr
r�OSErrorr9rMr>rQrh�tb_framerj�f_coderl�co_filenamerr�)r2r-rrr�getfiles6

��r�cCsTtj�|�}dd�tj��D�}|��|D]\}}|�|�r'|d|�SqdS)z1Return the module name for a given file, or None.cSsg|]	}t|�|f�qSr)r�)r�suffixrrr�
<listcomp>%s�z!getmodulename.<locals>.<listcomp>N)�os�path�basename�	importlib�	machinery�all_suffixesr��endswith)r�Zfname�suffixesZneglenr�rrr�
getmodulename!s�
�r�cs�t|��tjjdd�}|tjjdd�7}t�fdd�|D��r0tj���dtjj	d�nt�fdd�tjj
D��r?dStj���rG�St|��}t
|dd�durV�St
t
|dd�dd�durd�S�tjvrk�SdS)	z�Return the filename that can be used to locate an object's source.
    Return None if no way can be identified to get the source.
    Nc3��|]}��|�VqdSr��r��r�s��filenamerrr�4��z getsourcefile.<locals>.<genexpr>rc3r�r�r�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)r2Zall_bytecode_suffixesr-rr�r�
getsourcefile-s*
��

�r�cCs,|durt|�pt|�}tj�tj�|��S)z�Return an absolute path to the source or compiled file for an object.

    The idea is for each object to have a unique origin, so this routine
    normalizes the result as much as possible.N)r�r�r�r��normcase�abspath)r2�	_filenamerrr�
getabsfileFsr�c
	Cszt|�r|St|d�rtj�|j�S|dur"|tvr"tj�t|�Szt||�}Wntt	fy5YdSw|tvrBtj�t|�Stj�
���D].\}}t|�rwt|d�rw|j}|t
�|d�krbqI|t
|<t|�}|jt|<ttj�|�<qI|tvr�tj�t|�Stjd}t|d�s�dSt||j�r�t||j�}||ur�|Stjd}t||j�r�t||j�}	|	|ur�|SdSdS)zAReturn the module an object was defined in, or None if not found.rNr�r�r��builtins)r3rrrr
r�
modulesbyfiler�r$�FileNotFoundError�copyr)r��_filesbymodnamer�r�r��realpathr)
r2r��file�modnamer-rS�mainZ
mainobjectZbuiltinZ
builtinobjectrrrr�RsR
�
�
��


�r�c@�eZdZdS)�ClassFoundExceptionN�r�rr�rrrrr�src@s(eZdZdd�Zdd�ZeZdd�ZdS)�_ClassFindercCsg|_||_dSr�)�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�|�}|s8td��t
|�r@|dfSt|�r{|j}d�
|�}t�|�}t|�}z
|�|�Wtd��tyz}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��)abReturn the entire source file and starting line number for an object.

    The argument may be a module, class, method, function, traceback, frame,
    or code object.  The source code is returned as a list of all the lines
    in the file and the line number indexes a line in that list.  An OSError
    is raised if the source code cannot be retrieved.�<�>r�zcould not get source coder�Nzcould 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	r3r6r�r��ast�parser�visitr�argsr9rMr>rQrhr�rjr�rlrr�re�compile�
IndexError�match)
r2r�r-r�r�sourceZtreeZclass_finder�er�lnumZpatr�rrr�
findsource�sj



�
��


�
��r$c	Cs�zt|�\}}WnttfyYdSwt|�r�d}|r)|ddd�dkr)d}|t|�krI||��dvrI|d}|t|�krI||��dvs7|t|�kr�||dd�dkr�g}|}|t|�kr�||dd�dkr�|�||���|d}|t|�kr�||dd�dksmd�|�SdSdS|dk�rSt	||�}|d}|dk�rU||�
�dd�dk�rWt	||�|k�rY||���
�g}|dk�r|d}||���
�}|dd�dk�rt	||�|k�r|g|dd�<|d}|dkr�n||���
�}|dd�dk�rt	||�|ks�|�r0|d��dk�r0g|dd�<|�r0|d��dk�s|�rN|d	��dk�rNg|d	d�<|�rN|d	��dk�s<d�|�SdSdSdSdS)
zwGet lines of comments immediately preceding an object's source code.

    Returns None when source can't be found.
    Nr�z#!r�)r�#r&rr�)r$r�r$r3r��stripr�r�r�r�r�)r2r�r#�startZcomments�endr�Zcommentrrr�getcomments�sZ��   �
�
	$
$
"���
�r*c@r)�
EndOfBlockNrrrrrr+�r+c@s eZdZdZdd�Zdd�ZdS)�BlockFinderz@Provide a tokeneater() method to detect the end of a code block.cCs.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�lambdar8Frr�)r/r1r.r0�tokenize�NEWLINEr2r+�INDENTr3r��DEDENT�COMMENT�NL)r�r�tokenZsrowcolZerowcolr�rrr�
tokeneater"sF



�




�
��zBlockFinder.tokeneaterN)r�rr�r�rr@rrrrr-s	r-c	CsTt�}zt�t|�j�}|D]}|j|�qWnttfy"Ynw|d|j�S)z@Extract the block of code at the top of the given list of lines.N)	r-r9�generate_tokens�iter�__next__r@r+�IndentationErrorr2)r�Zblockfinder�tokensZ_tokenrrr�getblockMs��rFcCs^t|�}t|�\}}t|�r|j}t|�st|�r#|jjdkr#|dfSt||d��|dfS)a�Return a list of source lines and starting line number for an object.

    The argument may be a module, class, method, function, traceback, frame,
    or code object.  The source code is returned as a list of the lines
    corresponding to the object and the line number indicates where in the
    original source file the first line of code was found.  An OSError is
    raised if the source code cannot be retrieved.z<module>rNr�)	r.r$rhr�r3rjr��co_namerF�r2r�r#rrr�getsourcelinesXs�rIcCst|�\}}d�|�S)aReturn the text of the source code for an object.

    The argument may be a module, class, method, function, traceback, frame,
    or code object.  The source code is returned as a single string.  An
    OSError is raised if the source code cannot be retrieved.r)rIr�rHrrr�	getsourcems
rJcCsRg}|jtdd�d�|D]}|�||jf�||vr&|�t||||��q
|S)z-Recursive helper function for getclasstree().rr�r|)r�rr�rv�walktree)�classes�children�parentr��crrrrKws�rKcCs�i}g}|D]2}|jr/|jD]}||vrg||<|||vr%||�|�|r-||vr-nqq||vr8|�|�q|D]}||vrF|�|�q;t||d�S)a�Arrange the given list of classes into a hierarchy of nested lists.

    Where a nested list appears, it contains classes derived from the class
    whose entry immediately precedes the list.  Each entry is a 2-tuple
    containing a class and a tuple of its base classes.  If the 'unique'
    argument is true, exactly one entry appears in the returned structure
    for each class in the given list.  Otherwise, classes using multiple
    inheritance and their descendants will appear multiple times.N)rvr�rK)rL�uniquerM�rootsrOrNrrr�getclasstree�s&	
�
�
�rR�	Argumentszargs, varargs, varkwc	Cs�t|�std�|���|j}|j}|j}t|d|��}t||||��}d}||7}d}|jt@r<|j|}|d}d}|jt	@rH|j|}t
||||�S)aGet information about the arguments accepted by a code object.

    Three things are returned: (args, varargs, varkw), where
    'args' is the list of argument names. Keyword-only arguments are
    appended. 'varargs' and 'varkw' are the names of the * and **
    arguments or None.z{!r} is not a code objectNrr�)rlr$r��co_varnames�co_argcount�co_kwonlyargcount�listrR�
CO_VARARGS�CO_VARKEYWORDSrS)	�cor��nargsZnkwargsr�
kwonlyargs�step�varargs�varkwrrr�getargs�s"



r`�ArgSpeczargs varargs keywords defaultscCsDtjdtdd�t|�\}}}}}}}|s|rtd��t||||�S)aeGet the names and default values of a function's parameters.

    A tuple of four things is returned: (args, varargs, keywords, defaults).
    'args' is a list of the argument names, including keyword-only argument names.
    'varargs' and 'keywords' are the names of the * and ** parameters or None.
    'defaults' is an n-tuple of the default values of the last n parameters.

    This function is deprecated, as it does not support annotations or
    keyword-only parameters and will raise ValueError if either is present
    on the supplied callable.

    For a more structured introspection API, use inspect.signature() instead.

    Alternatively, use getfullargspec() for an API with a similar namedtuple
    based interface, but full support for annotations and keyword-only
    parameters.

    Deprecated since Python 3.5, use `inspect.getfullargspec()`.
    zhinspect.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%ra)r(rr^r_�defaultsr\�kwonlydefaultsr+rrr�
getargspec�s��rj�FullArgSpeczGargs, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotationsc
Csfzt|ddtdd�}Wnty}ztd�|�d}~wwg}d}d}g}g}i}d}	i}
|j|jur8|j|d<|j��D]a}|j}|j	}
|t
ur[|�|
�|j|jurZ|	|jf7}	n8|t
urq|�|
�|j|jurp|	|jf7}	n"|turx|
}n|tur�|�|
�|j|jur�|j|
|
<n|tur�|
}|j|jur�|j||
<q=|
s�d}
|	s�d}	t|||||	||
|�S)a$Get the names and default values of a callable object's parameters.

    A tuple of seven things is returned:
    (args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations).
    'args' is a list of the parameter names.
    'varargs' and 'varkw' are the names of the * and ** parameters or None.
    'defaults' is an n-tuple of the default values of the last n parameters.
    'kwonlyargs' is a list of keyword-only parameter names.
    'kwonlydefaults' is a dictionary mapping names from kwonlyargs to defaults.
    'annotations' is a dictionary mapping parameter names to annotations.

    Notable differences from inspect.signature():
      - the "self" parameter is always reported, even for bound methods
      - wrapper chains defined by __wrapped__ *not* unwrapped automatically
    F)�follow_wrapper_chains�skip_bound_arg�sigclsrzunsupported callableNr�return)�_signature_from_callable�	Signaturer�r$�return_annotation�empty�
parameters�valuesr�rw�_POSITIONAL_ONLYr��default�_POSITIONAL_OR_KEYWORD�_VAR_POSITIONAL�
_KEYWORD_ONLY�_VAR_KEYWORD�
annotationrk)r(�sig�exrr^r_�posonlyargsr\�annotationsrh�
kwdefaults�paramr�rwrrrrg�sj
�
��

�
�

�
��rg�ArgInfozargs varargs keywords localscCs t|j�\}}}t||||j�S)a9Get information about arguments passed into a particular frame.

    A tuple of four things is returned: (args, varargs, varkw, locals).
    'args' is a list of the argument names.
    'varargs' and 'varkw' are the names of the * and ** arguments or None.
    'locals' is the locals dictionary of the given frame.)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|��Sr�)r�)r|�r-rr�_formatannotationUr�z5formatannotationrelativeto.<locals>._formatannotation)r)r2r�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
s8ddlm}
|
dtdd����fdd�}g}|r!t|�t|�}t|�D]\}}||�}|r=||kr=||
|||�}|�|�q%|durQ|�|||���n|rX|�d	�|rv|D]}||�}|rp||vrp||
||�7}|�|�q\|dur�|�|	||���d
d�|�d}d
�vr�||��d
��7}|S)a�Format an argument spec from the values returned by getfullargspec.

    The first seven arguments are (args, varargs, varkw, defaults,
    kwonlyargs, kwonlydefaults, annotations).  The other five arguments
    are the corresponding optional formatting functions that are called to
    turn names and values into strings.  The last argument is an optional
    function to format the sequence of arguments.

    Deprecated since Python 3.5: use the `signature` function and `Signature`
    objects.
    r)rezc`formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directlyr%rbcs(�|�}|�vr|d��|�7}|S)Nz: r)�argr��r�r��	formatargrr�formatargandannotationtsz-formatargspec.<locals>.formatargandannotationNr��(�, �)ro)rdrerfr��	enumerater�r�)rr^r_rhr\rir�r��
formatvarargs�formatvarkw�formatvalueZ
formatreturnsr�rer��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)afFormat an argument spec from the 4 values returned by getargvalues.

    The first four arguments are (args, varargs, varkw, locals).  The
    next four arguments are the corresponding optional formatting functions
    that are called to turn names and values into strings.  The ninth
    argument is an optional function to format the sequence of arguments.cSs||�|||�Sr�r)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�rurrr��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�posrur��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^ZdefcountZgivenruZatleastZkwonly_givenZpluralr}Z
kwonly_sig�msgrr�r�	_too_many�s0�����r�cOs�t|�}|\}}}}}}	}
|j}i}t|�r!|jdur!|jf|}t|�}
t|�}|r/t|�nd}t|
|�}t|�D]
}|||||<q:|rQt||d��||<t||�}|r]i||<|�	�D])\}}||vrz|sst
d||f��||||<qa||vr�t
d||f��|||<qa|
|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)z�Get the mapping of arguments to values.

    A dict is returned, with keys the function argument names (including the
    names of the * and ** arguments, if any), and values the respective bound
    values from 'positional' and 'named'.Nrz*%s() got an unexpected keyword argument %rz(%s() got multiple values for argument %rTr�F)rgr�r9r�r�r�r�r�r~r)r$r�r�r�)r(r�Znamedr�rr^r_rhr\rir+r�Z	arg2valueZnum_posZnum_argsZnum_defaults�nr�Zpossible_kwargs�kwrZreqr�r��kwargrrr�getcallargs�sl
��
����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]/}|dvrKqDz||||<WqDtysz||||<Wntyp|�|�YnwYqDwt||||�S)a
    Get the mapping of free variables to their current values.

    Returns a named tuple of dicts mapping the current nonlocal, global
    and builtin references as seen by the body of the function. A final
    set of unbound names that could not be resolved is also provided.
    �{!r} is not a Python functionNcSsi|]\}}||j�qSr)�
cell_contents)r�varZcellrrrr"s��z"getclosurevars.<locals>.<dictcomp>�__builtins__)�None�True�False)r9rMr>r$r�rQ�__closure__�zip�co_freevarsr
r
r�r	r3r~�co_names�KeyErrorr�r�)	r(�codeZ
nonlocal_varsZ	global_nsZ
builtin_nsZglobal_varsZbuiltin_varsZ
unbound_namesrwrrr�getclosurevars
sB	
�
����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
yBd}}Yn wtdt|t
|�|��}||||�}|d|}nd}}t|||jj||�S)a�Get information about a frame or traceback object.

    A tuple of five things is returned: the filename, the line number of
    the current line, the function name, a list of lines of context from
    the source code, and the index of the current line within that list.
    The optional second argument specifies the number of lines of context
    to return, which are centered around the current line.z'{!r} is not a frame or traceback objectrr�r%N)rh�	tb_linenor��f_linenorjr$r�r�r�r$r��maxr�r�r�r�rG)r��contextrr�r(r�r#�indexrrr�getframeinfoDs&�r�cCr�)zCGet the line number from a frame object, allowing for optimization.)r��r�rrr�	getlinenodsr��	FrameInfor�cCs4g}|r|ft||�}|�t|��|j}|s|S)z�Get a list of records for a frame and all higher (calling) frames.

    Each record contains a frame object, filename, line number, function
    name, a list of lines of context, and index within the context.)r�r�r��f_back)r�r��	framelist�	frameinforrr�getouterframesks�r�cCs6g}|r|jft||�}|�t|��|j}|s|S)z�Get a list of records for a traceback's frame and all lower frames.

    Each record contains a frame object, filename, line number, function
    name, a list of lines of context, and index within the context.)r�r�r�r��tb_next)�tbr�r�r�rrr�getinnerframesws�r�cCsttd�r
t�d�SdS)z?Return the frame of the caller or None if this is not possible.�	_getframer�N)rrr�rrrr�currentframe�sr�cCstt�d�|�S)z@Return a list of records for the stack above the caller's frame.r�)r�rr��r�rrrr�srcCstt��d|�S)zCReturn a list of records for the stack below the current exception.r%)r�r�exc_infor�rrr�trace�sr�cCstjd�|�S)Nr�)rr	r;)�klassrrr�_static_getmro��r�cCs6i}zt�|d�}Wn	tyYnwt�||t�S�Nr	)r2�__getattribute__r�r r
�	_sentinel)r*�attrZ
instance_dictrrr�_check_instance�s�r�c	CsFt|�D]}tt|��tur z|j|WStyYqwqtSr�)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|�st|�}t|�}|tust|�tjurt||�}n|}t||�}|turB|turBtt|�d�turBtt|�d�turB|S|turH|S|turN|S||urutt|��D]}tt|��turtz|j	|WSt
ysYqXwqX|tur{|St|��)a�Retrieve attributes without triggering dynamic lookup via the
       descriptor protocol,  __getattr__ or __getattribute__.

       Note: this function may not be able to retrieve all attributes
       that getattr can fetch (like dynamically created attributes)
       and may find attributes that getattr can't (like descriptors
       that raise AttributeError). It can also return descriptor objects
       instead of instance members in some cases. See the
       documentation for details.
    r;r<)r�r�rr�rrDr�r�r�r	r�r�)r*r�rwZinstance_resultr�r�Zklass_resultr�rrr�getattr_static�s<
�
��r��GEN_CREATED�GEN_RUNNING�
GEN_SUSPENDED�
GEN_CLOSEDcC�,|jrtS|jdurtS|jjdkrtStS)a#Get current state of a generator-iterator.

    Possible states are:
      GEN_CREATED: Waiting to start execution.
      GEN_RUNNING: Currently being executed by the interpreter.
      GEN_SUSPENDED: Currently suspended at a yield expression.
      GEN_CLOSED: Execution has completed.
    Nr�)�
gi_runningr��gi_framer��f_lastir�r�)�	generatorrrr�getgeneratorstate��	
r�cCs6t|�std�|���t|dd�}|dur|jjSiS)z�
    Get the mapping of generator local variables to their current values.

    A dict is returned, with the keys the local variable names and values the
    bound values.z{!r} is not a Python generatorr�N)r_r$r�rr�r�)r�r�rrr�getgeneratorlocalssr��CORO_CREATED�CORO_RUNNING�CORO_SUSPENDED�CORO_CLOSEDcCr�)a&Get current state of a coroutine object.

    Possible states are:
      CORO_CREATED: Waiting to start execution.
      CORO_RUNNING: Currently being executed by the interpreter.
      CORO_SUSPENDED: Currently suspended at an await expression.
      CORO_CLOSED: Execution has completed.
    Nr�)�
cr_runningr��cr_framerr�r�r�)�	coroutinerrr�getcoroutinestater�rcCst|dd�}|dur
|jSiS)z�
    Get the mapping of coroutine local variables to their current values.

    A dict is returned, with the keys the local variable names and values the
    bound values.rN)rr�)rr�rrr�getcoroutinelocals/sr�
from_bytescCs6zt||�}Wn
tyYdSwt|t�s|SdS)z�Private helper. Checks if ``cls`` has an attribute
    named ``method_name`` and returns it only if it is a
    pure python function.
    N)rr�r�_NonUserDefinedCallables)r�Zmethod_nameZmethrrr�"_signature_get_user_defined_methodKs�
�rc
Cs�|j}t|���}|jp
d}|jpi}|r||}z
|j|i|��}Wnty9}z
d�|�}	t|	�|�d}~wwd}
|��D]�\}}z|j	|}
Wn	t
yTYn4w|jtur`|�
|�q@|jtur{||vrtd}
|j|
d�||<n|�
|j�q@|jtur�|j|
d�||<|
r�|jtus�J�|jtur�||jtd�}|||<|�|�q@|jttfvr�|�|�q@|jtur�|�
|j�q@|j|��d�S)	z�Private helper to calculate how 'wrapped_sig' signature will
    look like after applying a 'functools.partial' object (or alike)
    on it.
    rz+partial object {!r} has incorrect argumentsNFT)rw�r��rt)rtrr)r�keywords�bind_partialr$r�r%�	argumentsr�r�rvr�rx�replacerwrz�move_to_endr{ryru)�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



���






�rcCslt|j���}|r|djttfvrtd��|dj}|ttfvr(|dd�}n|t	ur0td��|j
|d�S)zWPrivate helper to transform signatures for unbound
    functions to bound methods.
    rzinvalid method signaturer�Nzinvalid argument typer
)r�rtrur�r{rzr%rxrvryr)r}�paramsr�rrr�_signature_bound_method�s
rcCs&t|�pt|�pt|t�p|ttfvS)zxPrivate helper to test if `obj` is a callable that might
    support Argument Clinic's __text_signature__ protocol.
    )rnrArrrr2rVrrr�_signature_is_builtin�s��
�rcCs�t|�rt|�r
dSt|dd�}t|dd�}t|dt�}t|dt�}t|dd�}t|tj�oMt|t�oM|dup;t|t�oM|dupDt|t	�oMt|t	�pM|duS)z�Private helper to test if `obj` is a duck type of FunctionType.
    A good example of such objects are functions compiled with
    Cython, which have all attributes that a pure Python function
    would have, but have their code statically compiled.
    Fr�NrQ�__defaults__�__kwdefaults__r)
r#r6r�_voidrrrkrr�r )r*rwr�rhr�r�rrrrO�s ����rOcCsr|�d�sJ�|�d�}|dkr|�d�}|�d�}|dks$||ks$J�|�d�}|dks3||ks3J�|d|�S)z� Private helper to get first parameter name from a
    __text_signature__ of a builtin method, which should
    be in the following format: '($param1, ...)'.
    Assumptions are that the first argument won't have
    a default value or an annotation.
    z($�,r�r��:r�r%)r�find)r�r�Zcposrrr�_signature_get_bound_param�s



rcCsX|s|ddfSd}d}dd�|�d�D�}t|�j}t�|�}d}d}g}|j}	d}
tj}tj}t|�}
|
j	tj
ks<J�|D]c}
|
j	|
j}}||krt|dkr_|rTd}n
|rXJ�d}|
d	7}
q>|d
krt|rgJ�|dusmJ�d}|
d	}q>||kr�|dkr�|dus�J�|
}q>|r�d}||kr�|dks�|	d
�|	|�|dkr�|	d�q>d�|�}|||fS)a�
    Private helper function. Takes a signature in Argument Clinic's
    extended signature format.

    Returns a tuple of three things:
      * that signature re-rendered in standard Python syntax,
      * the index of the "self" parameter (generally 0), or None if
        the function does not have a "self" parameter, and
      * the index of the last "positional only" parameter,
        or None if the signature has no positional-only parameters.
    NcSsg|]	}|r|�d��qS)�ascii)�encode)r�lrrrr�sz6_signature_strip_non_python_syntax.<locals>.<listcomp>r�FrrTr��/�$r�r�� r)
r�rBrCr9r�r?�OP�
ERRORTOKEN�nextr�ENCODING�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�s\


�

r.Tc	sTddl�|j�t|�\}}}d|d}z��|�}Wnty&d}Ynwt|�j�s4td�����|j	d}	g��j
�d}i�t�dd�}
|
rVtj
�|
d�}|rV|j�tj
���	�fdd�����	fd	d
��
G��
fdd�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#�s�J�t�dd�}|du}t#|�}|�r|�s|�r��$d�n
�dj%�jd�}|�d<|�|j
d�S)zdPrivate helper to parse content of '__text_signature__'
    and return a Signature based on it.
    rNzdef fooz: pass�"{!r} builtin has invalid signaturercs(t|�j�sJ�|jdurtd��|jS)Nz'Annotations are not currently supported)rr�r|r%)r�rrr�
parse_namejs
z&_signature_fromstr.<locals>.parse_namecslzt|��}Wnty!zt|��}Wn	tyt�wYnwt|tttttt	d�f�r4��
|�St�r�)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�rr9rr�visit_Attribute~s�z<_signature_fromstr.<locals>.RewriteSymbolics.visit_Attributecst|j�j�s
t���|j�Sr�)r�ctxZLoadr%r�rr=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�r�)r�left�rightrr6r%�opZAddrZSubZBitOr)r�rrArBr0rr�visit_BinOp�sz8_signature_fromstr.<locals>.RewriteSymbolics.visit_BinOpN)r�rr�r>r@rDrr=rr�RewriteSymbolics}srEcsh�|�}|r'|tur'z
���|�}��|�}Wnty&td����d�w���|�|�d��dS)Nr/�rwr|)�_emptyrZliteral_evalr%r�r�)Z	name_nodeZdefault_noderwrw)�	ParameterrErrsr�r*rtr1rr�p�s�z_signature_fromstr.<locals>.p)�	fillvaluer�r	�rr)&r�_parameter_clsr.r�SyntaxErrorrZModuler%r��bodyrsrrrr
r	r�ZNodeTransformerr;rrh�	itertools�zip_longest�POSITIONAL_ONLY�POSITIONAL_OR_KEYWORDr�rW�vararg�VAR_POSITIONAL�KEYWORD_ONLYr�r\�kw_defaultsr��VAR_KEYWORDr3r�r)r�r*r�rmr-r*r+Zprogramr-rSr,rIrrhrBr�rwrwZ_selfZself_isboundZ
self_ismoduler)rHrErrsr�r7r*rtr1r8r9r�_signature_fromstrEsr��


!
�
rXcCsBt|�std�|���t|dd�}|std�|���t||||�S)zHPrivate helper function to get signature for
    builtin callables.
    z%{!r} is not a Python builtin function�__text_signature__Nz#no signature found for builtin {!r})rr$r�rr%rX)r�r(rmr�rrr�_signature_from_builtin�s�rZc	CsFd}t|�st|�r
d}ntd�|���t|dd�}|r#t||||�S|j}|j}	|	j}
|	j	}|	j
}|d|
�}
|	j}||
|
|�}t||||d�}|j
}|j}|rXt|�}nd}g}|
|}|}|
d|�D]}|rntnt}|�|t�}|�||||d��|r�|d	8}qht|
|d��D]#\}}|r�tnt}|�|t�}|�||||||d
��|r�|d	8}q�|	jt@r�||
|}|�|t�}|�|||td��|D]}t}|dur�|�|t�}|�|t�}|�|||t|d
��q�|	jt@�r|
|}|	jt@�r|d	7}||}|�|t�}|�|||td��|||�dt�|d�S)
zCPrivate helper: constructs Signature for the given python function.FTr�rYNrr)r|r�r�)r|r�rwro�rr�__validate_parameters__)r>rOr$r�rrXrLrQrUrT�co_posonlyargcountrVr/rrr�rvrxr
rGr�r�rRrXryrzrYr{)r�r(rmrrrZis_duck_functionr�rHZ	func_codeZ	pos_countZ	arg_namesZ
posonly_countr�Zkeyword_only_countZkeyword_onlyr�rhr�Zpos_default_countrtZnon_default_countZposonly_leftrwr�r|�offsetrwr�rrr�_signature_from_function�s�

��
��

�

�
�
�r_)rlrmrrrc
Cs�tjt||||||d�}t|�std�|���t|tj�r*||j	�}|r(t
|�S|S|r>t|dd�d�}t|tj�r>||�Sz|j}Wn	t
yLYnw|dur_t|t�s]td�|���|Sz|j}	Wn	t
ymYn?wt|	tj�r�||	j�}
t|
|	d�}t|
j���d	}|jtjur�|St|j���}|r�||d	us�J�|f|}
|j|
d
�St|�s�t|�r�t||||||d�St|�r�t|||d�St|tj�r�||j�}
t|
|�Sd}t|t��rtt t|�d
�}|dur�||�}n6d}t |d�}t |d�}d|j!v�r|}nd|j!v�r|}n|du�r|}n|du�r|}|du�r'||�}|du�rs|j"dd�D]}z|j#}Wnt
�yEY�q3w|�rQt$|||�S�q3t|j"v�rs|j%t&j%u�rl|j't&j'u�rl|�(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�|���)zQPrivate helper function to get signature for arbitrary
    callable objects.
    )rlrmrrrnrz{!r} is not a callable objectcSst|d�p
t|tj�S)N�
__signature__)rrrr8r�rrrrzl	s
z*_signature_from_callable.<locals>.<lambda>r�Nz1unexpected object {!r} in __signature__ attributer�rr
)rmrrr)rm�__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'rpr#r$r�rrr8rMrr.r`r�rq�_partialmethod�
partialmethodr(rr�rtrur�rHrTrr>rOr_rrZrrr	r�rYrXrr2rb�
from_callabler%rrm)r*rlrmrrrrnZ_get_signature_ofr}rdrZfirst_wrapped_paramZ
sig_paramsrZcallZfactory_method�newZinitrxZtext_sigr~r�rrrrpG	s��

�
�
�

��









��
��


��

rpc@�eZdZdZdS)rz1A private marker - used in Parameter & Signature.N�r�rr�r�rrrrr
�rc@rg)rGz6Marker object for Signature.empty and Parameter.empty.NrhrrrrrG
rirGc@s4eZdZdZdZdZdZdZdd�Ze	dd	��Z
d
S)�_ParameterKindrr�r%��cCr�r�)�_name_r4rrr�__str__
sz_ParameterKind.__str__cCst|Sr�)�_PARAM_NAME_MAPPINGr4rrr�description
sz_ParameterKind.descriptionN)r�rr�rQrRrTrUrWrnr�rprrrrrj
srjzpositional-onlyzpositional or keywordzvariadic positionalr�zvariadic keywordc@s�eZdZdZdZeZeZe	Z
eZe
ZeZeed�dd�Zdd�Zdd	�Zed
d��Zedd
��Zedd��Zedd��Zeeeed�dd�Zdd�Zdd�Zdd�Zdd�ZdS)rHaRepresents a parameter in a function signature.

    Has the following public attributes:

    * name : str
        The name of the parameter as a string.
    * default : object
        The default value for the parameter if specified.  If the
        parameter has no default value, this attribute is set to
        `Parameter.empty`.
    * annotation
        The annotation for the parameter if specified.  If the
        parameter has no annotation, this attribute is set to
        `Parameter.empty`.
    * kind : str
        Describes how argument values are bound to the parameter.
        Possible values: `Parameter.POSITIONAL_ONLY`,
        `Parameter.POSITIONAL_OR_KEYWORD`, `Parameter.VAR_POSITIONAL`,
        `Parameter.KEYWORD_ONLY`, `Parameter.VAR_KEYWORD`.
    )�_name�_kind�_default�_annotationrFcCszt|�|_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)rjrrr%rGryr{r�rprsrtrrrr�r$�isdigitrxrv�isidentifierrq)r�rwr�rwr|r�rrrrM
s8�

�
zParameter.__init__cCs t|�|j|jf|j|jd�fS)N�rsrt)rrqrrrsrtr4rrr�
__reduce__u
s
��zParameter.__reduce__cC�|d|_|d|_dS)Nrsrtrw�r��staterrr�__setstate__{
�
zParameter.__setstate__cCr�r�)rqr4rrrrw
r�zParameter.namecCr�r�)rsr4rrrrw�
r�zParameter.defaultcCr�r�)rtr4rrrr|�
r�zParameter.annotationcCr�r�)rrr4rrrr��
r�zParameter.kind)rwr�r|rwcCsL|tur|j}|tur|j}|tur|j}|tur|j}t|�||||d�S)z+Creates a customized copy of the Parameter.rF)rrqrrrtrsr)r�rwr�r|rwrrrr�
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�rqrtrGr�r�rsr�ryr{)r�r��	formattedrrrrn�
s 
�

�zParameter.__str__cC�d�|jj|�S)Nz	<{} "{}">�r�r�r�r4rrr�__repr__�
r�zParameter.__repr__cCst|j|j|j|jf�Sr�)�hashrwr�r|rwr4rrr�__hash__�
szParameter.__hash__cCsJ||urdSt|t�s
tS|j|jko$|j|jko$|j|jko$|j|jkS�NT)rrH�NotImplementedrqrrrsrt�r��otherrrr�__eq__�
s

�
�
�zParameter.__eq__N)r�rr�r�r�rvrQrxrRryrTrzrUr{rWrGrsrrxr|r�rwrwr|r�rrrnr�r�r�rrrrrH-
s6(



�rHc@sheZdZdZdZdd�Zedd��Zedd��Zed	d
��Z	dd�Z
d
d�Zdd�Zdd�Z
dd�ZdS)�BoundArgumentsa�Result of `Signature.bind` call.  Holds the mapping of arguments
    to the function's parameters.

    Has the following public attributes:

    * arguments : dict
        An ordered mutable mapping of parameters' names to arguments' values.
        Does not contain arguments' default values.
    * signature : Signature
        The Signature object that created this instance.
    * args : tuple
        Tuple of positional arguments values.
    * kwargs : dict
        Dict of keyword arguments values.
    )r
�
_signature�__weakref__cCs||_||_dSr�)r
r�)r�r)r
rrrr�
r	zBoundArguments.__init__cCr�r�)r�r4rrrr)�
r�zBoundArguments.signaturec	Cs�g}|jj��D]5\}}|jttfvrt|�Sz|j|}Wn
ty,Yt|�Sw|jtkr8|�	|�q|�
|�qt|�Sr�)r�rtr)r�r{rzr
r�ry�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�rtr)r�r{rzr
r��update)r��kwargsZkwargs_startedrr�r�rrrr��
s(
�

zBoundArguments.kwargsc	Cs�|j}g}|jj��D]:\}}z|�|||f�WqtyE|jtur*|j}n|jt	ur2d}n
|jt
ur:i}nYq|�||f�Yqwt|�|_dS)z�Set default values for missing arguments.

        For variable-positional arguments (*args) the default is an
        empty tuple.

        For variable-keyword arguments (**kwargs) the default is an
        empty dict.
        rN)r
r�rtr)r�r�rwrGr�ryr{r )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__cCry)Nr�r
�r�r
rzrrrr|<r}zBoundArguments.__setstate__cCs|j|jd�S)Nr�r�r4rrr�__getstate__@�zBoundArguments.__getstate__cCs@g}|j��D]
\}}|�d�||��qd�|jjd�|��S)Nz{}={!r}z	<{} ({})>r�)r
r)r�r�r�r�r�)r�rr�rrrrr�CszBoundArguments.__repr__N)r�rr�r�r�rr�r)rr�r�r�r|r�r�rrrrr��
s


r�c@s�eZdZdZdZeZeZe	Z
d,e	dd�dd�Zedd	��Z
ed
d��Zeddddd
�dd��Zedd��Zedd��Zeed�dd�Zdd�Zdd�Zdd�Zdd�dd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�ZdS)-rqaA Signature object represents the overall signature of a function.
    It stores a Parameter object for each parameter accepted by the
    function, as well as information specific to the function itself.

    A Signature object has the following public attributes and methods:

    * parameters : OrderedDict
        An ordered mapping of parameters' names to the corresponding
        Parameter objects (keyword-only arguments are in the same order
        as listed in `code.co_varnames`).
    * return_annotation : object
        The annotation for the return type of the function if specified.
        If the function has no annotation for its return type, this
        attribute is set to `Signature.empty`.
    * bind(*args, **kwargs) -> BoundArguments
        Creates a mapping from positional and keyword arguments to
        parameters.
    * bind_partial(*args, **kwargs) -> BoundArguments
        Creates a partial mapping from positional and keyword arguments
        to parameters (simulating 'functools.partial' behavior.)
    )�_return_annotation�_parametersNTr[cCs�|durt�}n_|r^t�}t}d}|D]I}|j}|j}	||kr-d}
|
�|j|j�}
t|
��||kr5d}|}|ttfvrK|jt	urI|rHd}
t|
��nd}|	|vrXd�|	�}
t|
��|||	<qn	tdd�|D��}t
�|�|_||_
dS)	z�Constructs Signature from the given list of Parameter
        objects and 'return_annotation'.  All arguments are optional.
        NFz7wrong parameter order: {} parameter before {} parameterz-non-default argument follows default argumentTzduplicate parameter name: {!r}css�|]}|j|fVqdSr�r��rr�rrrr��r�z%Signature.__init__.<locals>.<genexpr>)rrvr�rwr�rpr%rxrwrGr�MappingProxyTyper�r�)r�rtrrr\rZtop_kindZ
kind_defaultsr�r�rwr�rrrrhsD��
�	

�#
zSignature.__init__cC�tjdtdd�t||�S)z�Constructs Signature for the given python function.

        Deprecated since Python 3.5, use `Signature.from_callable()`.
        z_inspect.Signature.from_function() is deprecated since Python 3.5, use Signature.from_callable()r%rb)rdrerfr_�r�r(rrr�
from_function���
zSignature.from_functioncCr�)z�Constructs Signature for the given builtin function.

        Deprecated since Python 3.5, use `Signature.from_callable()`.
        z^inspect.Signature.from_builtin() is deprecated since Python 3.5, use Signature.from_callable()r%rb)rdrerfrZr�rrr�from_builtin�r�zSignature.from_builtinF��follow_wrappedrrrcCst||||||d�S)z3Constructs Signature for the given callable object.)rnrlrrr)rp)r�r*r�rrrrrrre�s�zSignature.from_callablecCr�r�)r�r4rrrrt�r�zSignature.parameterscCr�r��r�r4rrrrr�r�zSignature.return_annotation)rtrrcCs0|tur	|j��}|tur|j}t|�||d�S)z�Creates a customized copy of the Signature.
        Pass 'parameters' and/or 'return_annotation' arguments
        to override them in the new copy.
        rK)rrtrur�r)r�rtrrrrrr�s
�zSignature.replacecCs8tdd�|j��D��}dd�|j��D�}|||jfS)Ncss�|]
}|jtkr|VqdSr�)r�rzr�rrrr��s�
��z(Signature._hash_basis.<locals>.<genexpr>cSsi|]}|jtkr|j|�qSr)r�rzrwr�rrrr�s
�z)Signature._hash_basis.<locals>.<dictcomp>)r�rtrurr)r�r�
kwo_paramsrrr�_hash_basis�szSignature._hash_basiscCs(|��\}}}t|���}t|||f�Sr�)r��	frozensetrur�)r�rr�rrrrrr��szSignature.__hash__cCs*||urdSt|t�s
tS|��|��kSr�)rrqr�r�r�rrrr��s

zSignature.__eq__�r'cCs|i}t|j���}d}t|�}	zt|�}Wn`tyvzt|�}	Wn
ty-YYn�w|	jtkr5Yn�|	j|vrR|	jtkrMd}
|
j	|	jd�}
t
|
�d�|	f}Yns|	jtks\|	jt
ura|	f}Ynd|rh|	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�|�r8|du�r,|||j<nt
d	j	tt|��d���|�||�S)
z#Private method. Don't use directly.rTzA{arg!r} parameter is positional only, but was passed as a keyword)r�Nz$missing a required argument: {arg!r}ztoo many positional argumentsz$multiple values for argument {arg!r}z*got an unexpected keyword argument {arg!r})rBrtrur&�
StopIterationr�ryrwrvr�r$r{rwrGrzr�r�rO�chainr�r��_bound_arguments_cls)r�rr�r'r
rtZ
parameters_exZarg_valsZarg_valr�r�ruZkwargs_paramrrrr�_bind�s��






�(
���

���
�J

�����


��zSignature._bindcOs|�||�S)z�Get a BoundArguments object, that maps the passed `args`
        and `kwargs` to the function's signature.  Raises `TypeError`
        if the passed arguments can not be bound.
        �r��r�rr�rrr�bindmrGzSignature.bindcOs|j||dd�S)z�Get a BoundArguments object, that partially maps the
        passed `args` and `kwargs` to the function's signature.
        Raises `TypeError` if the passed arguments can not be bound.
        Tr�r�r�rrrrtszSignature.bind_partialcCs t|�t|j���fd|jifS�Nr�)rr�r�rur�r4rrrrx{s�zSignature.__reduce__cCs|d|_dSr�r�rzrrrr|�r�zSignature.__setstate__cCr)Nz<{} {}>r�r4rrrr��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 -> {})
rtrurr�rvr�ryrzr�r�rrrGr�)	r�r�Zrender_pos_only_separatorZrender_kw_only_separatorr�r~r�ZrenderedZannorrrrn�s0




zSignature.__str__r�)r�rr�r�r�rHrLr�r�rGrsrr�r�r�rer�rtrrrrr�r�r�r�r�rrxr|r�rnrrrrrqJs@�6

�

	rqr�cCstj|||||d�S)z/Get a signature object for the passed callable.r�)rqre)r*r�rrrrrrr)�s�r)c
Cs�ddl}ddl}|��}|jddd�|jdddd	d
�|��}|j}|�d�\}}}z	|�|�}}	Wn(ty\}
zd�	|t
|
�j|
�}t|t
jd
�t
�d�WYd}
~
nd}
~
ww|rp|�d�}|	}|D]}
t||
�}qh|	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)z6 Logic for inspecting an object given at command line rNr2zCThe 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_argsr2�	partition�
import_moduler�r�rr��printr�stderr�exitr�r�builtin_module_namesZdetailsr��
__cached__r�r�rr�r$rJ)r�r��parserr�targetZmod_nameZ	has_attrsZattrsr*r-r�r��parts�part�__rrrr�_main�sd�����


��r�r�r�)F)r�)r)T)TNNF)�r��
__author__rdr�disZcollections.abcrc�enum�importlib.machineryr�rOr�r�rrr9r?rrdr&r��operatorrrrrZmod_dictZCOMPILER_FLAG_NAMESr)r�r�rsr/r3r6r9rArCrrFrKr>rUrWrYrZr\r_rarfrhrjrlrnroryr�r�r�r}r.r�r�r�r�r�r�r�r�r�r�r�r�r�rZNodeVisitorrr$r*r+r-rFrIrJrKrRrSr`rarjrkrgr�r�r�r�rr�r�r�r�r�r�r�r�r�r��_fieldsr�r�r�r�rr�r2r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrraZ_WrapperDescriptor�allZ_MethodWrapperr3r	Z_ClassMethodWrapperrmrrrrrrOrr.rXrZr_rprrG�IntEnumrjrQrvrRrxrTryrUrzrWr{rorHr�rqr)r�r�rrrr�<module>s� t	






	

,t$
>
	
/D-6




�
]


�;
�
<
5
 



		0

�
L
H
�`�B�	l
:
�