ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/coverage/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/coverage/__pycache__/parser.cpython-311.pyc

�

�܋f�����dZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
mZmZmZmZmZmZmZmZmZddlmZddlmZddlmZdd	lmZmZdd
l m!Z!m"Z"ddl#m$Z$ddl%m&Z&m'Z'm(Z(Gd
�d��Z)Gd�d��Z*Gd�dej+dd����Z,Gd�de&��Z-ee'eeee.ee.ffZ/Gd�d��Z0Gd�de0��Z1Gd�de0��Z2Gd�de0��Z3Gd�d e0��Z4Gd!�d"ej5��Z6d7d'�Z7Gd(�d)��Z8d*gZ9d8d.�Z:de;fd9d6�Z<dS):zCode parsing for coverage.py.�)�annotationsN)�CodeType)
�cast�Any�Callable�Dict�Iterable�List�Optional�Sequence�Set�Tuple)�env)�code_objects)�short_stack)�NoSource�	NotPython)�
join_regex�	nice_pair)�generate_tokens)�Protocol�TArc�TLineNoc�~�eZdZdZ			d%d&d	�Zd'd
�Zd(d�Zd)d�Zd*d�Zd+d�Z	d,d�Z
d(d�Zd-d�Zd(d�Z
d.d�Z	d/d0d$�ZdS)1�PythonParserz�Parse code to find executable lines, excluded lines, etc.

    This information is all based on static analysis: no code execution is
    involved.

    N�text�
Optional[str]�filename�exclude�return�Nonec�D�|s|s
Jd���|pd|_|�||_nJddlm}	||j��|_n-#t$r }td|j�d|����|�d}~wwxYw||_|j�d��|_t��|_
t��|_t��|_t��|_
t��|_t��|_d	|_i|_d|_d|_dS)
z�
        Source can be provided as `text`, the text itself, or `filename`, from
        which the text will be read.  Excluded lines are those that match
        `exclude`, a regex string.

        z*PythonParser needs either text or filenamez<code>Nr)�get_python_sourcezNo source for code: 'z': �
F)rr�coverage.pythonr#�OSErrorrr�split�lines�set�
statements�excluded�raw_statements�raw_excluded�
raw_classdefs�raw_docstrings�show_tokens�
_multiline�	_all_arcs�_missing_arc_fragments)�selfrrrr#�errs      �b/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/coverage/parser.py�__init__zPythonParser.__init__%sJ���M�x�M�M�!M�M�M�� �,�H��
���!�D�I�I�9�9�9�9�9�9�
Y�-�-�d�m�<�<��	�	���
Y�
Y�
Y��N�t�}�N�N��N�N�O�O�UX�X�����
Y�������!%�	���� 5� 5��
�
),�����'*�e�e��
�-0�E�E���+.�%�%���,/�5�5���-0�E�E���!���35���/3���?C��#�#�#s�?�
A)�	A$�$A)�regexes�str�Set[TLineNo]c���t|��}tj|��}t��}t	|jd���D]/\}}|�|��r|�|���0|S)z�Find the lines matching one of a list of regexes.

        Returns a set of line numbers, the lines that contain a match for one
        of the regexes in `regexes`.  The entire line needn't match, just a
        part of it.

        ���start)r�re�compiler)�	enumerater(�search�add)r4r8�combined�regex_c�matches�i�ltexts       r6�lines_matchingzPythonParser.lines_matchingest���g�&�&���*�X�&�&���%�%��!�$�*�A�6�6�6�	�	�H�A�u��~�~�e�$�$�
����A�������c
�&�|jr|�|j��|_d}d}d}d}tj}d}d}d}d}	|j�J�t
|j��}
|
D�],\}}\}
}\}}}|jrJttj
�||��d�dt|
|f��d�d|d�d|����|tjkr|d	z
}�na|tj
kr|d	z}�nJ|tjkr"|d
kr|j�|
���n|tjkr�|dkr6|	dkr0||jvp|}|s"|r |j�|��|}d}d}n�|dkr*|r(||jvrd}|r|j�|��n�|d
vr|	d	z
}	n�|dvr|	d	z}	n�|tjkr<|tjkr,|j�t+|
|d	z����n<|tjkr,|�&||kr t+||d	z��D]}||j|<�
d}d}|���r>|tjkr.d}|�*|
}|r||krd}|r|j�|��d}|}��.|sGt5|j|j���}|j�|�����t<jj r%|jr tC|j��|jd	<dSdSdS)zwParse the source to find the interesting facts about its lines.

        A handful of attributes are updated.

        rFNTz>10� z>5�20r<�class�:�@z([{z)]})r)"rrIr-�token�INDENTrrr0�print�tokenize�tok_name�getr�DEDENT�NAMEr.rC�OP�STRINGr/�update�range�NEWLINEr1�strip�COMMENT�
ByteParserrr,�_find_statementsr�
PYBEHAVIOR�module_firstline_1�min)r4�indent�exclude_indent�	excluding�excluding_decorators�prev_toktype�
first_line�empty�
first_on_line�nesting�tokgen�toktype�ttext�slineno�_�elinenorH�should_exclude�l�byte_parsers                    r6�
_raw_parsezPythonParser._raw_parseus����<�	B� $� 3� 3�D�L� A� A�D�������	�$���|���
����
����y�$�$�$� ���+�+��AG�B	#�B	#�=�G�U�L�W�a�,�7�A����
���%�)�)�'�7�;�;�;�;�;��w��0�1�1�1�1�1�5�5�5�5�%�%������%�,�&�&��!�����E�L�(�(��!�����E�J�&�&��G�#�#��&�*�*�7�3�3�3���E�H�$�$��C�<�<�G�q�L�L�&-��1B�&B�%[�G[�N�$�5��5��)�-�-�g�6�6�6�)/��$(�	�/4�,���c�\�\�m�\��$�"3�3�3�/3�,�+�7��)�-�-�g�6�6�6���e�^�^��q�L�G�G��e�^�^��q�L�G���E�L�(�(�\�U�\�-I�-I�
�#�*�*�5��'�!�)�+D�+D�E�E�E�E��E�M�)�)��)�g��.C�.C�#�:�w�q�y�9�9�8�8��-7����*�*�!�
� $�
��{�{�}�}�
*��H�,<�!<�!<����%�!(�J� �*�V�~�%=�%=�$)�	� �7��)�-�-�g�6�6�6�$)�M�"�L�L��	G�$�T�Y���G�G�G�K���&�&�{�'C�'C�'E�'E�F�F�F�
�>�,�	:���	:�!$�T�%8�!9�!9�D�O�A����	:�	:�	:�	:rJ�linenorc��|dkr|j�||��}n|j�||��}|S)zAReturn the first line number of the statement including `lineno`.r)r1rV)r4rxs  r6rjzPythonParser.first_line�sG���A�:�:��o�)�)�6�'�F�7�;�;�;�F�F��_�(�(���8�8�F��
rJ�linenos�Iterable[TLineNo]c� ���fd�|D��S)z�Map the line numbers in `linenos` to the correct first line of the
        statement.

        Returns a set of the first lines.

        c�:��h|]}��|����S��rj)�.0rur4s  �r6�	<setcomp>z+PythonParser.first_lines.<locals>.<setcomp>�s%���4�4�4�q�����"�"�4�4�4rJr~)r4rzs` r6�first_lineszPythonParser.first_lines�s���5�4�4�4�G�4�4�4�4rJr(c�,�|�|��S)z)Implement `FileReporter.translate_lines`.)r�)r4r(s  r6�translate_lineszPythonParser.translate_lines�s������&�&�&rJ�arcs�Iterable[TArc]�	Set[TArc]c� ���fd�|D��S)z(Implement `FileReporter.translate_arcs`.c�j��h|]/\}}��|����|��f��0Sr~r)r��a�br4s   �r6r�z.PythonParser.translate_arcs.<locals>.<setcomp>�s:���L�L�L�V�a������#�#�T�_�_�Q�%7�%7�8�L�L�LrJr~)r4r�s` r6�translate_arcszPythonParser.translate_arcs�s���L�L�L�L�t�L�L�L�LrJc���	|���n{#tjttf$r\}t|d��r|j}n|jdd}td|j	�d�|jd�d|��z��|�d}~wwxYw|�
|j��|_|j|j
z}|j|z
}|�
|��|z
|_dS)z�Parse source text to find executable lines, excluded lines, etc.

        Sets the .excluded and .statements attributes, normalized to the first
        line of multi-line statements.

        rxr<rzCouldn't parse 'z' as Python source: z	 at line N)rwrT�
TokenError�IndentationError�SyntaxError�hasattrrx�argsrrr�r-r+r/r,r*)r4r5rx�ignore�startss     r6�parse_sourcezPythonParser.parse_source�s��
	��O�O�������#�%5�{�C�	�	�	��s�H�%�%�
(�������!��Q����F�4�=�F�F�F��8�A�;�3�3�6�3�3�4����
�����	�����(�(��):�;�;��
����!4�4���$�v�-���*�*�6�2�2�V�;����s��B�AB
�
Bc�X�|j�|���|j�J�|jS)z�Get information about the arcs available in the code.

        Returns a set of line number pairs.  Line numbers have been normalized
        to the first line of multi-line statements.

        )r2�_analyze_ast�r4s r6r�zPythonParser.arcss4���>�!��������~�)�)�)��~�rJc�^�t|j|j|j��}|���t��|_|jD]Q\}}|�|��}|�|��}||kr|j�	||f���R|j
|_dS)zkRun the AstArcAnalyzer and save its results.

        `_all_arcs` is the set of arcs in the code.

        N)�AstArcAnalyzerrr,r1�analyzer)r2r�rjrC�missing_arc_fragmentsr3)r4�aaa�l1�l2�fl1�fl2s      r6r�zPythonParser._analyze_asts����T�Y��(;�T�_�M�M�����
�
�
�������h�	/�	/�F�B���/�/�"�%�%�C��/�/�"�%�%�C��c�z�z���"�"�C��:�.�.�.��&)�&?��#�#�#rJ�Dict[TLineNo, int]c��tjt��}|���D]0\}}|dkr�||jvr�||jvr� ||xxdz
cc<�1|jD]}||vr||xxdzcc<�|S)zYGet a count of exits from that each line.

        Excluded lines are excluded.

        rr<)�collections�defaultdict�intr�r+r.)r4�exit_countsr�r�rus     r6r�zPythonParser.exit_counts,s���+6�*A�#�*F�*F���i�i�k�k�
	!�
	!�F�B���A�v�v���T�]�"�"���T�]�"�"����O�O�O�q� �O�O�O�O��#�	$�	$�A��K����A����!�#������rJr>�end�
executed_arcs�Optional[Iterable[TArc]]c��|j�|���|j�J�|}|r"|dkr||kr||f|vr||f|jvr||}}|j�||fdg��}g}|D]�\}}|�0|dkr(||f|jvr|�||��cSd}nd}|�|���}d|�d|��}	|�|	d	|�|�����z
}	|�|	����d
�|��S)z5Provide an English sentence describing a missing arc.Nr�NNz didn't jump to the function exitzdidn't jump to line {lineno}�rxzline rLz
, because � or )r3r�rV�missing_arc_description�format�append�join)
r4r>r�r��actual_start�fragment_pairs�msgs�smsg�emsg�msgs
          r6r�z$PythonParser.missing_arc_descriptionGst���&�.��������.�:�:�:���
�	$��!�G�G���v�
�
�
�%�L�
�-�-�
�%�L�D�7�7�7��e�3�E��4�8�8�%����~�V�V����(�	�	�J�D�$��|���7�7���c�{�d�&A�A�A�#�;�;�S�D�#�F�F�F�F�F�=�D�D�9�D��;�;�c�;�*�*�D�/�,�/�/��/�/�C����F�D�K�K�|�K�$D�$D�F�F�F���K�K�������{�{�4� � � rJ)NNN)rrrrrrr r!)r8r9r r:�r r!)rxrr r)rzr{r r:)r(r{r r:)r�r�r r�)r r�)r r��N)r>rr�rr�r�r r9)�__name__�
__module__�__qualname__�__doc__r7rIrwrjr�r�r�r�r�r�r�r�r~rJr6rrs;��������#�"&�!%�	>D�>D�>D�>D�>D�@���� e:�e:�e:�e:�N����5�5�5�5�'�'�'�'�M�M�M�M�<�<�<�<�2
�
�
�
�@�@�@�@�$����>37�	+!�+!�+!�+!�+!�+!�+!rJrc�8�eZdZdZ		ddd�Zdd
�Zdd�Zdd�ZdS)r`z3Parse bytecode to understand the structure of code.Nrr9�code�Optional[CodeType]rrr r!c���||_|�	||_dS|�J�	t||dd���|_dS#t$r'}t	d||j|jpdfz��|�d}~wwxYw)N�execT)�dont_inheritz5Couldn't parse '%s' as Python source: '%s' at line %dr)rr�r@r�rr�rx)r4rr�r�synerrs     r6r7zByteParser.__init__xs�����	����D�I�I�I��'�'�'�
�#�D�(�F��N�N�N��	�	�	���
�
�
��K� �&�*�f�m�.@�q�O�����	�����
���s�2�
A#�"A�A#�Iterable[ByteParser]c�D���fd�t�j��D��S)z~Iterate over all the code objects nested within this one.

        The iteration includes `self` as its first value.

        c3�D�K�|]}t�j|���V��dS))r�N)r`r)r��cr4s  �r6�	<genexpr>z+ByteParser.child_parsers.<locals>.<genexpr>�s2�����O�O�!�
�4�9�1�-�-�-�O�O�O�O�O�OrJ)rr�r�s`r6�
child_parserszByteParser.child_parsers�s*���P�O�O�O�|�D�I�7N�7N�O�O�O�OrJr{c#�K�t|jd��r(|j���D]\}}}|r|V��
dS|jjddd�}|jjddd�}d}|jj}d}t||��D]9\}}	|r||kr|V�|}||z
}tjjr|	dkr|	dz}	||	z
}�:||kr|V�dSdS)z�Yield the line numbers possible in this code object.

        Uses co_lnotab described in Python/compile.c to find the
        line numbers.  Produces a sequence: l0, l1, ...
        �co_linesrN�r<��)	r�r�r��	co_lnotab�co_firstlineno�ziprrb�negative_lnotab)
r4rr�line�byte_increments�line_increments�
last_line_num�line_num�byte_num�	byte_incr�	line_incrs
          r6�
_line_numberszByteParser._line_numbers�s1�����4�9�j�)�)�	�"�i�0�0�2�2�
�
�
��1�d����J�J�J��
�
�
#�i�1�!�$�Q�$�7�O�"�i�1�!�$�Q�$�7�O� �M��y�/�H��H�(+�O�_�(M�(M�
&�
&�$�	�9��*��=�0�0�&����(0�
��	�)�H��>�1�'�i�4�6G�6G���&�I��I�%����=�(�(�������)�(rJc#�lK�|���D]}|���Ed{V���dS)z�Find the statements in `self.code`.

        Produce a sequence of line numbers that start statements.  Recurses
        into all code objects reachable from `self.code`.

        N)r�r�)r4�bps  r6razByteParser._find_statements�sT�����$�$�&�&�	*�	*�B��'�'�)�)�)�)�)�)�)�)�)�)�	*�	*rJr�)rr9r�r�rrr r!)r r�)r r{)r�r�r�r�r7r�r�rar~rJr6r`r`us{������=�=�
$(�"&�	�����(P�P�P�P�����<	*�	*�	*�	*�	*�	*rJr`c�&��eZdZdZd	d
�fd�
Z�xZS)�ArcStarta�The information needed to start an arc.

    `lineno` is the line number the arc starts from.

    `cause` is an English text fragment used as the `startmsg` for
    AstArcAnalyzer.missing_arc_fragments.  It will be used to describe why an
    arc wasn't executed, so should fit well into a sentence of the form,
    "Line 17 didn't run because {cause}."  The fragment can include "{lineno}"
    to have `lineno` interpolated into it.

    Nrxr�causerr c�J��t���|||��Sr�)�super�__new__)�clsrxr��	__class__s   �r6r�zArcStart.__new__�s����w�w���s�F�E�2�2�2rJr�)rxrr�rr r�)r�r�r�r�r��
__classcell__)r�s@r6r�r��sL�������
�
�3�3�3�3�3�3�3�3�3�3�3rJr��Arcz
lineno, causec� �eZdZdZ		dd
d�ZdS)�	TAddArcFnz&The type for AstArcAnalyzer.add_arc().Nr>rr�r�rr�r r!c��dSr�r~�r4r>r�r�r�s     r6�__call__zTAddArcFn.__call__�s	��	�rJr��
r>rr�rr�rr�rr r!)r�r�r�r�r�r~rJr6r�r��s;������0�0�
#�"�������rJr�c�2�eZdZdZd
d�Zd
d	�Zd
d
�Zd
d�ZdS)�Blocka;
    Blocks need to handle various exiting statements in their own ways.

    All of these methods take a list of exits, and a callable `add_arc`
    function that they can use to add arcs if needed.  They return True if the
    exits are handled, or False if the search should continue up the block
    stack.
    �exits�
Set[ArcStart]�add_arcr�r �boolc��t�)zProcess break exits.��AssertionError�r4r�r�s   r6�process_break_exitszBlock.process_break_exits��
���rJc��t�)zProcess continue exits.r�r�s   r6�process_continue_exitszBlock.process_continue_exits�r�rJc��dS)zProcess raise exits.Fr~r�s   r6�process_raise_exitszBlock.process_raise_exits�����urJc��dS)zProcess return exits.Fr~r�s   r6�process_return_exitszBlock.process_return_exits�rrJN�r�r�r�r�r r�)r�r�r�r�r�r�r�rr~rJr6r�r��sn�������������������������rJr�c�*�eZdZdZdd�Zdd�Zdd
�ZdS)�	LoopBlockz@A block on the block stack representing a `for` or `while` loop.r>rr r!c�:�||_t��|_dSr�)r>r)�break_exits�r4r>s  r6r7zLoopBlock.__init__s����
�*-�%�%����rJr�r�r�r�r�c�:�|j�|��dS�NT)rr[r�s   r6r�zLoopBlock.process_break_exitss�������&�&�&��trJc�H�|D]}||j|j|j���dSr
)rxr>r��r4r�r��xits    r6r�z LoopBlock.process_continue_exits
s3���	7�	7�C��G�C�J��
�C�I�6�6�6�6��trJN�r>rr r!r)r�r�r�r�r7r�r�r~rJr6rr�sV������J�J�0�0�0�0����������rJrc�*�eZdZdZdd�Zdd�Zdd�ZdS)�
FunctionBlockz>A block on the block stack representing a function definition.r>r�namer9r r!c�"�||_||_dSr��r>r)r4r>rs   r6r7zFunctionBlock.__init__s����
���	�	�	rJr�r�r�r�r�c�\�|D](}||j|j|jd|j�����)dS)Nzdidn't except from function T�rxr>r�rrs    r6r�z!FunctionBlock.process_raise_exits�M���	�	�C��G��
�T�Z�K���<�t�y�<�<�
�
�
�
��trJc�\�|D](}||j|j|jd|j�����)dS)Nzdidn't return from function Trrs    r6rz"FunctionBlock.process_return_exits rrJN)r>rrr9r r!r)r�r�r�r�r7r�rr~rJr6rrsV������H�H��������������rJrc�:�eZdZdZdd�Zdd
�Zdd�Zdd�Zdd�ZdS)�TryBlockz6A block on the block stack representing a `try` block.�
handler_start�Optional[TLineNo]�final_startr r!c��||_||_t��|_t��|_t��|_t��|_dSr�)rrr)�
break_from�
continue_from�
raise_from�return_from)r4rrs   r6r7zTryBlock.__init__+sH��*���&���*-�����,/�E�E���),�����*-�%�%����rJr�r�r�r�r�c�L�|j�|j�|��dSdS�NTF)rrr[r�s   r6r�zTryBlock.process_break_exits8s+����'��O�"�"�5�)�)�)��4��urJc�L�|j�|j�|��dSdSr#)rrr[r�s   r6r�zTryBlock.process_continue_exits>s,����'���%�%�e�,�,�,��4��urJc��|j�"|D]}||j|j|j���n#|j�J�|j�|��dSr
)rrxr�rr r[rs    r6r�zTryBlock.process_raise_exitsDsl����)��
C�
C�����
�D�$6��	�B�B�B�B�
C��#�/�/�/��O�"�"�5�)�)�)��trJc�L�|j�|j�|��dSdSr#)rr!r[r�s   r6rzTryBlock.process_return_exitsMs,����'���#�#�E�*�*�*��4��urJN)rrrrr r!r)	r�r�r�r�r7r�r�r�rr~rJr6rr)s~������@�@�0�0�0�0������������������rJrc�F�eZdZdZdd�Z	ddd�Zdd�Zdd�Zdd�Zdd�Z	dS)�	WithBlockz7A block on the block stack representing a `with` block.r>rr r!c��tjjsJ�||_t	��|_t	��|_t	��|_dSr�)rrb�exit_through_withr>r)rrr!rs  r6r7zWithBlock.__init__VsI���~�/�/�/�/���
�*-�����,/�E�E���*-�%�%����rJNr�r�r�r��from_set�Optional[Set[ArcStart]]r�c�v�|D]}||j|j|j���|�|�|��dS)z*Helper to process the four kinds of exits.NT)rxr>r�r[)r4r�r�r+r
s     r6�_process_exitszWithBlock._process_exitsdsM���	7�	7�C��G�C�J��
�C�I�6�6�6�6����O�O�E�"�"�"��trJc�:�|�|||j��Sr�)r.rr�s   r6r�zWithBlock.process_break_exitsqs���"�"�5�'�4�?�C�C�CrJc�:�|�|||j��Sr�)r.rr�s   r6r�z WithBlock.process_continue_exitsts���"�"�5�'�4�3E�F�F�FrJc�.�|�||��Sr�)r.r�s   r6r�zWithBlock.process_raise_exitsws���"�"�5�'�2�2�2rJc�:�|�|||j��Sr�)r.r!r�s   r6rzWithBlock.process_return_exitszs���"�"�5�'�4�3C�D�D�DrJrr�)r�r�r�r�r+r,r r�r)
r�r�r�r�r7r.r�r�r�rr~rJr6r(r(Ts�������A�A�0�0�0�0�$-1�	�����D�D�D�D�G�G�G�G�3�3�3�3�E�E�E�E�E�ErJr(c��eZdZdZdd�ZdS)	�NodeListz�A synthetic fictitious node, containing a sequence of nodes.

    This is used when collapsing optimized if-statements, to represent the
    unconditional execution of one of the clauses.

    �body�Sequence[ast.AST]r r!c�8�||_|dj|_dS�Nr)r5rx)r4r5s  r6r7zNodeList.__init__�s����	��1�g�n����rJN)r5r6r r!)r�r�r�r�r7r~rJr6r4r4~s2��������%�%�%�%�%�%rJr4�nounr9r �)Callable[[AstArcAnalyzer, ast.AST], None]c���d�fd�}|S)	zPA function to make methods for expression-based callable _code_object__ methods.r4r��node�ast.ASTr r!c	���|�|��}|�||dd��d|����|�||dd��d|����dS)Nzdidn't run the z	 on line zdidn't finish the )�
line_for_noder�)r4r<r>r9s   �r6�!_code_object__expression_callablezG_make_expression_code_method.<locals>._code_object__expression_callable�sr����"�"�4�(�(�����e�V�U�D�*R�D�*R�*R�5�*R�*R�S�S�S����U�U�F�D�*U�t�*U�*U�e�*U�*U�V�V�V�V�VrJ)r4r�r<r=r r!r~)r9r@s` r6�_make_expression_code_methodrA�s/���W�W�W�W�W�W�-�,rJc��eZdZdZd[d
�Zd\d�Z		d]d^d�Zd_d�Zd`d�Zdad�Z	dbd�Z
e	Zdcd�Ze	Z
e	Zddd �Zded"�Zhd#�Zdfd%�Z		d]dgd,�Zdhd.�Zdid0�Zdjd2�Zdkd4�Zdld5�Zdmd7�Zdmd8�Zdmd9�Zdmd:�Zdnd<�Zdod=�ZeZdpd?�Z dqdA�Z!e!Z"eZ#eZ$drdB�Z%e&j'dCkrdsdE�Z(dtdF�Z)dudH�Z*dvdJ�Z+dwdL�Z,dxdN�Z-dydO�Z.dzdQ�Z/e/Z0d{dR�Z1d|dS�Z2e2Z3d}dU�Z4e5dV��Z6e5dW��Z7e8j9j:r#e5dX��Z;e5dY��Z<e5dZ��Z=dSdS)~r�z>Analyze source text with an AST to find executable code paths.rr9r*r:�	multiline�Dict[TLineNo, TLineNo]r r!c�X��tj|��|_�fd�|D��|_�|_tt
tj�	dd������}|rBtd|j����td|j����t|j��t��|_
tjt ��|_g|_tt
tj�	dd������|_dS)Nc�<��h|]}��||����Sr~)rV)r�rurCs  �r6r�z*AstArcAnalyzer.__init__.<locals>.<setcomp>�s'���C�C�C�1�9�=�=��A�.�.�C�C�CrJ�COVERAGE_AST_DUMPrzStatements: zMultiline map: �COVERAGE_TRACK_ARCS)�ast�parse�	root_noder*rCr�r��os�environrVrS�ast_dumpr)r�r�r��listr��block_stack�debug)r4rr*rC�dump_asts   ` r6r7zAstArcAnalyzer.__init__�s������4�����C�C�C�C�
�C�C�C���"�����B�J�N�N�+>��B�B�C�C�D�D���	%��2���2�2�3�3�3��4�D�N�4�4�5�5�5��T�^�$�$�$�"�u�u��	�5@�4K�D�4Q�4Q��"�(*����#�b�j�n�n�-B�A�F�F�G�G�H�H��
�
�
rJc��tj|j��D]/}|jj}t|d|zd��}|�||���0dS)z�Examine the AST tree from `root_node` to determine possible arcs.

        This sets the `arcs` attribute to be a set of (from, to) line number
        pairs.

        �_code_object__N)rI�walkrKr�r��getattr)r4r<�	node_name�code_object_handlers    r6r�zAstArcAnalyzer.analyze�sc���H�T�^�,�,�	*�	*�D���/�I�")�$�0@�9�0L�d�"S�"S��"�.�#�#�D�)�)�)��		*�	*rJNr>rr�r�rr�c
��|jr8td|�d|�d|�d|����ttd�����|j�||f��|�|�&|j||f�||f��dSdS)z@Add an arc, including message fragments to use if it is missing.z
Adding possible arc: (�, z): �
)�limitN)rQrSrr�rCr�r�r�s     r6r�zAstArcAnalyzer.add_arc�s����:�	)��P�U�P�P�c�P�P�d�P�P��P�P�Q�Q�Q��+�B�'�'�'�(�(�(��	�
�
�u�c�l�#�#�#���t�/��&��s�|�4�;�;�T�4�L�I�I�I�I�I� 0�/rJ�Iterable[Block]c�*�t|j��S)z.Yield the blocks in nearest-to-farthest order.)�reversedrPr�s r6�nearest_blockszAstArcAnalyzer.nearest_blocks�s����(�)�)�)rJr<r=c���|jj}tttt
jgtft|d|zd����}|�||��S|j	S)z}What is the right line number to use for this node?

        This dispatches to _line__Node functions where needed.

        �_line__N)
r�r�rrrrI�ASTrrVrx�r4r<rW�handlers    r6r?zAstArcAnalyzer.line_for_node�se���N�+�	���X�s�w�i��0�1�2��D�)�i�/��6�6�
�
�����7�4�=�=� ��;�rJ�ast.FunctionDefc��|j}tjjstjjr|jr|jdj}|S)zSCompute first line number for things that can be decorated (classes and functions).r)rxrrb�trace_decorated_def�def_ast_no_decorator�decorator_list)r4r<rxs   r6�_line_decoratedzAstArcAnalyzer._line_decorated�sB������>�-�	7���1T�	7��"�
7��,�Q�/�6���
rJ�
ast.Assignc�6�|�|j��Sr�)r?�value�r4r<s  r6�
_line__AssignzAstArcAnalyzer._line__Assign�s���!�!�$�*�-�-�-rJ�ast.Dictc��|jr1|jd�|jdjS|jdjS|jSr8)�keysrx�valuesros  r6�_line__DictzAstArcAnalyzer._line__Dict�s@���9�	��y��|�'��y��|�*�*��{�1�~�,�,��;�rJ�ast.Listc�^�|jr |�|jd��S|jSr8)�eltsr?rxros  r6�_line__ListzAstArcAnalyzer._line__Lists.���9�	��%�%�d�i��l�3�3�3��;�rJ�
ast.Modulec�z�tjjrdS|jr |�|jd��SdS�Nr<r)rrbrcr5r?ros  r6�
_line__ModulezAstArcAnalyzer._line__Module
s?���>�,�	��1�
�Y�	��%�%�d�i��l�3�3�3��1rJ>�Expr�Pass�Assert�Assign�Delete�Global�Import�Nonlocal�	AnnAssign�	AugAssign�
ImportFromr�c�r�|jj}tttt
jgttft|d|zd����}|�||��Stjr||jvrtd|�����t|�|����hS)a�Add the arcs for `node`.

        Return a set of ArcStarts, exits from this node to the next. Because a
        node represents an entire sub-tree (including its children), the exits
        from a node can be arbitrarily complex::

            if something(1):
                if other(2):
                    doit(3)
                else:
                    doit(5)

        There are two exits from line 1: they start at line 3 and line 5.

        �	_handle__Nz*** Unhandled: )r�r�rrrrIrcr
r�rVr�TESTING�
OK_TO_DEFAULT�RuntimeErrorr?rds    r6�add_arcszAstArcAnalyzer.add_arcss��� �N�+�	���X�s�w�i��X��6�7�8��D�+�	�1�4�8�8�
�
�����7�4�=�=� ��{�
A��D�$6�6�6�&�'?��'?�'?�@�@�@��T�/�/��5�5�6�6�7�7rJr5r6�
from_start�Optional[ArcStart]�prev_startsr,c�h�|�|�J�|h}|D]�}|�|��}|j�||��}||jvr/|�|��}|��S|}|�|��}|D]#}|�|j||j���$|�|��}��|S)auAdd arcs for the body of a compound statement.

        `body` is the body node.  `from_start` is a single `ArcStart` that can
        be the previous line in flow before this body.  `prev_starts` is a set
        of ArcStarts that can be the previous line.  Only one of them should be
        given.

        Returns a set of ArcStarts, the exits from this body.

        )	r?rCrVr*�find_non_missing_noder�rxr�r�)	r4r5r�r��	body_noderxrj�maybe_body_node�
prev_starts	         r6�
add_body_arcszAstArcAnalyzer.add_body_arcs=s��� ���)�)�)�%�,�K��	3�	3�I��'�'�	�2�2�F���+�+�F�F�;�;�J����0�0�"&�"<�"<�Y�"G�"G��"�*��+�	��+�+�I�6�6��)�
J�
J�
����Z�.��
�8H�I�I�I�I��-�-�	�2�2�K�K��rJ�Optional[ast.AST]c�d�|�|��}|j�||��}||jvr|St	t
ttjgt
tjft|d|j
jzd����}|�||��}nd}|S)aSearch `node` looking for a child that has not been optimized away.

        This might return the node you started with, or it will work recursively
        to find a child node in self.statements.

        Returns a node, or None if none of the node remains.

        �
_missing__N)r?rCrVr*rrrrIrcrVr�r�)r4r<rxrj�
missing_fn�ret_nodes      r6r�z$AstArcAnalyzer.find_non_missing_node^s����#�#�D�)�)���^�'�'���7�7�
����(�(��K���X�s�w�i��#�'�):�:�;�<��D�,���)@�@�$�G�G�
�
�
��!�!�z�$�'�'�H�H��H��rJ�ast.Ifc��|�t|j����}|r|S|jr'|�t|j����SdSr�)r�r4r5�orelse)r4r<�non_missings   r6�_missing__IfzAstArcAnalyzer._missing__If�s]���0�0��$�)�1D�1D�E�E���	����;�	E��-�-�h�t�{�.C�.C�D�D�D��trJr4c���g}|jD].}|�|��}|�|�|���/|sdSt|��dkr|dSt	|��Sr|)r5r�r��lenr4)r4r<�non_missing_children�child�maybe_childs     r6�_missing__NodeListz!AstArcAnalyzer._missing__NodeList�s��� "���Y�	9�	9�E��4�4�U�;�;�K��&�$�+�+�K�8�8�8��$�	��4��#�$�$��)�)�'��*�*��,�-�-�-rJ�	ast.Whilec�N�|�t|j����}|sdStj��}|j|_tj��|_|j|j_d|j_t|d��sJ�|j|_g|_
|S)N�Truer5)r�r4r5rI�Whilerx�Name�test�idr�r�)r4r<�
body_nodes�	new_whiles    r6�_missing__WhilezAstArcAnalyzer._missing__While�s����/�/����0C�0C�D�D�
��	��4��I�K�K�	�%�,�	������	�� *� 1�	���"�	����z�6�*�*�*�*�*�#��	���	���rJc�t�|jj}|dvrdSt|tj��r|jdvrdSdS)z Is this a compile-time constant?)�Constant�NameConstant�Numr�)r��Falser!�	__debug__r�N)r�r��
isinstancerIr�r�)r4r<rWs   r6�is_constant_exprzAstArcAnalyzer.is_constant_expr�sI���N�+�	��;�;�;��5�
��c�h�
'�
'�	��w�@�@�@��v��trJr�c�p�|���D] }|�||j��rdS�!dS)z0Add arcs due to jumps from `exits` being breaks.N)r`r�r��r4r��blocks   r6r�z"AstArcAnalyzer.process_break_exits��M���(�(�*�*�	�	�E��(�(����=�=�
����
�	�	rJc�p�|���D] }|�||j��rdS�!dS)z3Add arcs due to jumps from `exits` being continues.N)r`r�r�r�s   r6r�z%AstArcAnalyzer.process_continue_exits�sM���(�(�*�*�	�	�E��+�+�E�4�<�@�@�
����
�	�	rJc�p�|���D] }|�||j��rdS�!dS)z0Add arcs due to jumps from `exits` being raises.N)r`r�r�r�s   r6r�z"AstArcAnalyzer.process_raise_exits�r�rJc�p�|���D] }|�||j��rdS�!dS)z1Add arcs due to jumps from `exits` being returns.N)r`rr�r�s   r6rz#AstArcAnalyzer.process_return_exits�sM���(�(�*�*�	�	�E��)�)�%���>�>�
����
�	�	rJ�	ast.Breakc��|�|��}t|d���}|�|h��t��S)Nz*the break on line {lineno} wasn't executed�r�)r?r�r�r))r4r<�here�break_starts    r6�_handle__BreakzAstArcAnalyzer._handle__Break�sG���!�!�$�'�'���t�+W�X�X�X��� � �+��/�/�/��u�u�rJc���|j}|j}|j}|�r�tjjstjjrd}|D]7}|�|��}|�||kr|�||��|}�8|�J�tjjr|�||��|}tjjr�t||dd���D]A\}}|�|�|��|�|�����B|�|�|d��|��|�||�|d����|j
rr|�|j
d��}	|j�|	|	��}	t|dz|	��D]#}
|
|jvr|�||
��|
}�$|�J�t|��hS)zBAdd arcs for things that can be decorated (classes and functions).Nr<r���)rxrjrrbrhrir?r��trace_decorator_line_againr�r5rCrVr\r*r�)r4r<�	main_line�last�decs�dec_node�	dec_start�top�bot�
body_startrxs           r6�_handle_decoratedz AstArcAnalyzer._handle_decorated�s��!�[�	�"&�+���"���	&��~�1�
�S�^�5X�
��� �
!�
!�� �.�.�x�8�8�	��#�	�T�(9�(9��L�L��y�1�1�1� ����#�#�#��~�1�
!����T�9�-�-�-� ���~�8�
F� #�D�$�q�r�r�(� 3� 3�S�S�H�C���L�L��!3�!3�C�!8�!8�$�:L�:L�S�:Q�:Q�R�R�R�R����T�/�/��Q��8�8�)�D�D�D����Y��(:�(:�4��8�(D�(D�E�E�E�
�y�
&�!�/�/��	�!��=�=�
�!�^�/�/�
�J�G�G�
�#�D��F�J�7�7�&�&�F����0�0����T�6�2�2�2�%������������rJ�ast.Continuec��|�|��}t|d���}|�|h��t��S)Nz-the continue on line {lineno} wasn't executedr�)r?r�r�r))r4r<r��continue_starts    r6�_handle__Continuez AstArcAnalyzer._handle__ContinuesH���!�!�$�'�'��!�$�.]�^�^�^���#�#�^�$4�5�5�5��u�u�rJ�ast.Forc�<�|�|j��}|j�t	|�����t|d���}|�|j|���}|D]#}|�|j	||j
���$|j���}t|t��sJ�|j
}t|d���}|jr"|�|j|���}||z}n|�|��|S)Nr=z'the loop on line {lineno} never startedr��r�z)the loop on line {lineno} didn't complete)r?�iterrPr�rr�r�r5r�rxr��popr�rr�rC)r4r<r>r�r�r
�my_block�
else_exitss        r6�_handle__ForzAstArcAnalyzer._handle__Fors ���"�"�4�9�-�-������	�� 6� 6� 6�7�7�7��e�+T�U�U�U�
��"�"�4�9��"�D�D���	7�	7�C��L�L���U�C�I�6�6�6�6��#�'�'�)�)���(�I�.�.�.�.�.��$���e�+V�W�W�W�
��;�	"��+�+�D�K�J�+�O�O�J��Z��E�E�
�I�I�j�!�!�!��rJc���|�|j��}t|d���}|�|j|���}t|d���}||�|j|���z}|S)N�-the condition on line {lineno} was never truer�r��.the condition on line {lineno} was never false)r?r�r�r�r5r�)r4r<r>r�r�s     r6�_handle__IfzAstArcAnalyzer._handle__If2s{���"�"�4�9�-�-���e�+Z�[�[�[�
��"�"�4�9��"�D�D���e�+[�\�\�\�
�
��#�#�D�K�J�#�G�G�G���rJ)�r[�	ast.Matchc�$�|�|��}|}t��}d}|jD]�}|�|j��}|j}t	|t
j��r'|jd}t	|t
j���'t	|t
j��rd}|�	||d��t|d���}	||�|j|	���z}|}��|s|�
|	��|S)NFr�Tz+the pattern on line {lineno} always matchedz*the pattern on line {lineno} never matchedr�r�)r?r)�cases�patternr�rI�MatchOr�patterns�MatchAsr�r�r�r5rC)
r4r<r>�
last_startr��had_wildcard�case�
case_startr�r�s
          r6�_handle__MatchzAstArcAnalyzer._handle__Match;s���&�&�t�,�,�E��J��E�E�E� �L��
�

(�

(��!�/�/���=�=�
��,�� ��#�+�6�6�3�%�.�r�2�G�!��#�+�6�6�3��g�s�{�3�3�(�#'�L����Z��5b�c�c�c�%��F����
���+�+�D�I�*�+�M�M�M��'�
�
��
&��	�	�*�%�%�%��LrJc��|�|��}|�|jt|�����}|S)Nr�)r?r�r5r��r4r<r>r�s    r6�_handle__NodeListz AstArcAnalyzer._handle__NodeListRs:���"�"�4�(�(���"�"�4�9��%���"�I�I���rJ�	ast.Raisec��|�|��}t|d���}|�|h��t��S)Nz*the raise on line {lineno} wasn't executedr�)r?r�r�r))r4r<r��raise_starts    r6�_handle__RaisezAstArcAnalyzer._handle__RaiseWsG���!�!�$�'�'���t�+W�X�X�X��� � �+��/�/�/��u�u�rJ�
ast.Returnc��|�|��}t|d���}|�|h��t��S)Nz+the return on line {lineno} wasn't executedr�)r?r�rr))r4r<r��return_starts    r6�_handle__ReturnzAstArcAnalyzer._handle__Return^sG���!�!�$�'�'����,Y�Z�Z�Z���!�!�<�.�1�1�1��u�u�rJ�ast.Tryc�@�|jr!|�|jd��}nd}|jr!|�|jd��}nd}|�|�J�t||��}|j�|��|�|��}|�|jt|�����}|jr"d|_	|jrt��|_n|j���t��}|jrmd}|jD]c}	|�|	��}|�|�
||��|}d}
t||
���}||�|	j|���z}�d|jr|�|j|���}||z}|j�rg|j���||jz|jz|jz|jz}|�|j|���}
|jr�t$jjrU|jD]E}|j}|j�|���}|
D]}|�
|j||����F|j}n|�|j|
��}|�|��|jr�t$jjrU|jD]E}|j}|j�|���}|
D]}|�
|j||����F|j}n|�|j|
��}|�|��|jr.|�|�|j|
����|jr�t$jjrU|jD]E}|j}|j�|���}|
D]}|�
|j||����F|j}n|�|j|
��}|�|��|r|
}|S)Nrr�z3the exception caught by line {lineno} didn't happenr�)r�r�)�handlersr?�	finalbodyrrPr�r�r5r�rr)r r�r�r�rrr!rrb�finally_jumps_backrxr�r��_combine_finally_startsr�r�r�r)r4r<rr�	try_blockr>r��
handler_exits�last_handler_start�handler_node�
from_causer��
final_from�final_exits�
break_linerxr��
final_exit�breaks�
continue_line�	continues�return_line�returnss                       r6�_handle__TryzAstArcAnalyzer._handle__Tryes����=�	!� �.�.�t�}�Q�/?�@�@�M�M� �M��>�	��,�,�T�^�A�->�?�?�K�K��K��(�K�,C�,C�C��]�K�8�8�	�����	�*�*�*��"�"�4�(�(���"�"�4�9��%���"�I�I��
�>�	#�&*�I�#��}�
-�(+�u�u�	�$���� � �"�"�"�'*�u�u�
��=�		^�48�� $�
�
^�
^�� $� 2� 2�<� @� @�
�%�1��L�L�!3�]�C�C�C�%2�"�R�
�%�m�:�F�F�F�
���!3�!3�L�4E�R\�!3�!]�!]�]�
�
��;�	G��&�&�t�{��&�F�F�E�
�����>�8	$��� � �"�"�"���$�%��'�(��$�%��%�	&�
��,�,�T�^��,�T�T�K��#�

1��>�4�]�&/�&:�K�K�
�!+�!2�� *� 0� 7� 7�v� 7� F� F��*5�K�K�J� �L�L��):�F�E�J�J�J�J�K�&�1�F�F�!�9�9�)�:N�P[�\�\�F��(�(��0�0�0��&�

7��>�4�c�)2�)@�K�K�
�!.�!5�� -� 3� :� :�&� :� I� I��*5�K�K�J� �L�L��):�F�E�J�J�J�J�K� )� 7�I�I� $� <� <�Y�=T�Va� b� b�I��+�+�I�6�6�6��#�
��(�(��0�0��1E�{�S�S�����$�

3��>�4�_�'0�'<�K�K��!,�!3�� +� 1� 8� 8�� 8� G� G��*5�K�K�J� �L�L��):�F�E�J�J�J�J�K�'�3�G�G�"�:�:�9�;P�R]�^�^�G��)�)�'�2�2�2��
$�$���rJr�c����g}t|��D]<}|j�3|�|j�|j������=d�|����fd�|D��}|S)aHelper for building the cause of `finally` branches.

        "finally" clauses might not execute their exits, and the causes could
        be due to a failure to execute any of the exits in the try block. So
        we use the causes from `starts` as the causes for `exits`.
        Nr�r�c�:��h|]}t|j�����Sr~)r�rx)r�r
r�s  �r6r�z9AstArcAnalyzer._combine_finally_starts.<locals>.<setcomp>�s%���>�>�>���#�*�e�,�,�>�>�>rJ)�sortedr�r�r�rxr�)r4r�r��causesr>r�s     @r6rz&AstArcAnalyzer._combine_finally_starts�s�������F�^�^�	G�	G�E��{�&��
�
�e�k�0�0���0�E�E�F�F�F�����F�#�#��>�>�>�>��>�>�>���rJc�0�|�|j��x}}|�|j��}d}|rd}tjjrd}|r |�|jd��}|j�t|�����t|d���}|�|j|���}|D]#}|�|j
||j���$t��}|j���}	t#|	t��sJ�|�|	j��t|d���}|jr"|�|j|���}
||
z}n|s|�|��|S)	NFTrr=r�r�r�r�)r?r�r�rrb�keep_constant_testr5rPr�rr�r�r�rxr�r)r�r�r[rr�rC)r4r<r>�to_top�
constant_test�top_is_body0r�r�r
r�r�s           r6�_handle__WhilezAstArcAnalyzer._handle__While�s����+�+�D�I�6�6�6����-�-�d�i�8�8�
����	 ��L��>�,�	!� �L��	6��'�'��	�!��5�5�F�����	�� 7� 7� 7�8�8�8��e�+Z�[�[�[�
��"�"�4�9��"�D�D���	8�	8�C��L�L���V�S�Y�7�7�7�7������#�'�'�)�)���(�I�.�.�.�.�.�
���X�)�*�*�*��e�+[�\�\�\�
��;�	&��+�+�D�K�J�+�O�O�J��Z��E�E�!�
&��	�	�*�%�%�%��rJ�ast.Withc��|�|��}tjjr(|j�t
|�����|�|jt|�����}tjj�r|j�
��}t|t��sJ�t|��h}|r"|D]}|�|j
|���|}|jr.|�|�|j|����|jr.|�|�|j|����|jr.|�|�|j|����|S)Nr=r�)r?rrbr*rPr�r(r�r5r�r�r�r�rxrr�rrr�r!r)r4r<r>r��
with_block�	with_exitr
s       r6�
_handle__WithzAstArcAnalyzer._handle__Withs����"�"�4�(�(���>�+�	<���#�#�I�E�$:�$:�$:�;�;�;��"�"�4�9��%���"�I�I���>�+�	��)�-�-�/�/�J��j�)�4�4�4�4�4�!�%���)�I��
"� �4�4�C��L�L���U�3�3�3�3�!���$�
��(�(��0�0��1F�	�R�R�����'�
��+�+��0�0��1I�9�U�U�����%�
��)�)��0�0��1G��S�S�����rJc�B�|�|��}|jrT|�|jt|�����}|D]%}|�|j||jd���&dS|�||��|�||��dS)Nr�zdidn't exit the module)r?r5r�r�r�rxr��r4r<r>r�r
s     r6�_code_object__Modulez#AstArcAnalyzer._code_object__Module"s����"�"�4�(�(���9�	(��&�&�t�y�X�u�f�=M�=M�&�N�N�E��
V�
V�����S�Z�%����<T�U�U�U�U�
V�
V�
�L�L�%���'�'�'��L�L����'�'�'�'�'rJc�<�|�|��}|j�t||j�����|�|jt|�����}|�|��|j�	��dS)Nrr�)
r?rPr�rrr�r5r�rr�r�s    r6�_code_object__FunctionDefz(AstArcAnalyzer._code_object__FunctionDef-s����"�"�4�(�(������
�E��	� J� J� J�K�K�K��"�"�4�9��5�&�9I�9I�"�J�J���!�!�%�(�(�(���������rJ�ast.ClassDefc��|�|��}|�||��|�|jt	|�����}|D]-}|�|j||jd|j�����.dS)Nr�zdidn't exit the body of class )r?r�r�r5r�rxr�rr s     r6�_code_object__ClassDefz%AstArcAnalyzer._code_object__ClassDef6s����"�"�4�(�(�����e�V�U�#�#�#��"�"�4�9��%���"�I�I���	�	�C��L�L��
�U�F�C�I�>���>�>�
�
�
�
�	�	rJ�lambdazgenerator expressionzdictionary comprehensionzset comprehensionzlist comprehension)rr9r*r:rCrDr r!r�r�r�)r r])r<r=r r)r<rfr r)r<rlr r)r<rqr r)r<rvr r)r<rzr r)r<r=r r�)r5r6r�r�r�r,r r�)r<r=r r�)r<r�r r�)r<r4r r�)r<r�r r�)r<r=r r)r�r�r r!)r<r�r r�)r<rfr r�)r<r�r r�)r<r�r r�)r<r�r r�)r<r�r r�)r<r4r r�)r<r�r r�)r<r�r r�)r<r�r r�)r�r�r�r�r r�)r<r�r r�)r<rr r�)r<rzr r!)r<rfr r!)r<r$r r!)>r�r�r�r�r7r�r�r`r?rkrp�_line__ClassDefru�_line__FunctionDef�_line__AsyncFunctionDefryr}r�r�r�r�r�r�r�r�r�r�r�rr�r��_handle__ClassDefr�r��_handle__AsyncFor�_handle__FunctionDef�_handle__AsyncFunctionDefr��sys�version_infor�r�r�r�rrrr�_handle__AsyncWithr!r#�_code_object__AsyncFunctionDefr&rA�_code_object__Lambda�_code_object__GeneratorExprrb�comprehensions_are_functions�_code_object__DictComp�_code_object__SetComp�_code_object__ListCompr~rJr6r�r��s�������H�H� I� I� I� I�D*�*�*�*�"#�"�J�J�J�J�J� *�*�*�*����� ����.�.�.�.�&�O�	�	�	�	�)��-�������������M�
8�8�8�8�H*.�/3�	�����B����D	�	�	�	�.�.�.�.� 
�
�
�
�����2����������������"����# �# �# �# �J*����������(%��,�� 1��������7�"�"�	�	�	�	�.����
��������m�m�m�m�^
�
�
�
�����:����6'��	(�	(�	(�	(�����&?�"�����8�7��A�A��!=�!=�>T�!U�!U��
�~�2�T�!=�!=�>X�!Y�!Y�� <� <�=P� Q� Q��!=�!=�>R�!S�!S����T�TrJr��ctxrnrr�c��|dgdit��t��tfvp't|tt
ttf��S)z:Is `value` simple enough to be displayed on a single line?Nr~)r)�	frozenset�Ellipsisr��bytesr��floatr9)rns r6�_is_simple_valuer?LsC��	�$��B��C�E�E�9�;�;��A�A�	4��5�5�#�u�c�2�3�3�rJr<r=�depthr�rS�Callable[[str], None]r!c���d|z}t|dd��}|�bd|j�d|j��}t|d��r?t|d��sJ�|dz
}|j|jkr
||j�d�z
}||j�z
}nd	}|�d
|jj�|��}d�tj	|��D��}|s||�d���dSt|��d
kr<t|dd
��r!|d\}}	||�d|�d|	�d���dS||��	|dz}
|D]�\}}	|
�|�d�}t|	��r||�d|	�����,t|	t ��rW||�d���|	D]7}t|��r||
�d|�����"t#||dz|����8||
�d�����||��t#|	|dz|�����||�d���dS)z`Dump the AST for `node`.

    This recursively walks the AST, printing a readable version.

    rLrxNz @ �,�
end_lineno�end_col_offsetrO��<c�.�g|]\}}|tv�||f��Sr~)�SKIP_DUMP_FIELDS)r�rrns   r6�
<listcomp>zast_dump.<locals>.<listcomp>ks6������D�%��'�'�'�
�u�
�'�'�'rJ�>r<rz: z{}# mro: {}rZc3�$K�|]}|jV��dSr�)r�)r�r�s  r6r�zast_dump.<locals>.<genexpr>ys$����!Q�!Q��!�*�!Q�!Q�!Q�!Q�!Q�!QrJz    z [�)rS�])rVrx�
col_offsetr�rDrEr�r�rI�iter_fieldsr�r?r�r��__mro__r�rOrN)
r<r@rSrerx�linemark�head�named_fields�
field_namern�next_indent�prefix�ns
             r6rNrNSs����5�[�F�
�T�8�T�
*�
*�F�
��8���8�8�t��8�8���4��&�&�	1��4�!1�2�2�2�2�2���O�H���$�+�-�-��t��1�1�1�1���4�.�0�0�H�����:�:�t�~�.�:��:�:�D����?�4�0�0����L�
��
���j�j�j������	�\�	�	�a�	�	�$4�\�!�_�Q�5G�$H�$H�	�(��O��
�E�
���0�0�
�0�0�e�0�0�0�1�1�1�1�1�
��d����	��v�o��!-�	8�	8��J��#�2�Z�2�2�2�F���&�&�
8����+�+�%�+�+�,�,�,�,��E�4�(�(�

8����m�m�m�$�$�$��<�<�A�'��*�*�<����7�7�!�7�7�8�8�8�8� ��E�A�I�U�;�;�;�;�;����'�'�'�(�(�(�(���f�
�
�
�����	��7�7�7�7�7�
���l�l�l�����rJ)r9r9r r:)rnrr r�)r<r=r@r�rSrAr r!)=r��
__future__rrIr�rLr?r/rQrT�typesr�typingrrrrr	r
rrr
r�coverager�coverage.bytecoder�coverage.debugr�coverage.exceptionsrr�
coverage.miscrr�coverage.phystokensr�coverage.typesrrrrr`�
namedtupler�r�r9�
TArcFragmentsr�rrrr(rcr4rAr�rIr?rSrNr~rJr6�<module>res
��$�#�"�"�"�"�"�"�
�
�
�
�����	�	�	�	�	�	�	�	�
�
�
�
���������������������������������������������*�*�*�*�*�*�&�&�&�&�&�&�3�3�3�3�3�3�3�3�/�/�/�/�/�/�/�/�/�/�/�/�/�/�2�2�2�2�2�2�2�2�2�2�T!�T!�T!�T!�T!�T!�T!�T!�n
F*�F*�F*�F*�F*�F*�F*�F*�Z
3�
3�
3�
3�
3�%�{�%�e�_�=�=�
3�
3�
3� 	�	�	�	�	��	�	�	��T�4��h�s�m�X�c�]�&B� C�D�D�E�
���������>���������$�����E����2(�(�(�(�(�u�(�(�(�V'E�'E�'E�'E�'E��'E�'E�'E�T	%�	%�	%�	%�	%�s�w�	%�	%�	%�-�-�-�-�o
T�o
T�o
T�o
T�o
T�o
T�o
T�o
T�h�7�������#(�9�9�9�9�9�9�9rJ

Zerion Mini Shell 1.0