%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Create Path :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/traceback.cpython-311.pyc

�

c��fc�����dZddlZddlZddlZddlZddlZddlmZgd�Z	d2d�Z
d�Zd3d�Zd2d�Z
d2d	�Zd
ZdZGd�d
��Ze��Zd�Zeedddfd�Zeeddfd�Zefd�Zd�Zefd�Zd4d�Zd5d�Zd4d�Zd6d�Zd3d�Zd3d�Zd�Z Gd�d��Z!d�Z"d�Z#d �Z$d!�Z%d"Z&Gd#�d$e'��Z(d%�Z)ej*d&gd'�d(d)g�*��Z+d+�Z,d,Z-d-�Z.Gd.�d/��Z/Gd0�d1��Z0dS)7z@Extract, format and print information about Python stack traces.�N)�suppress)�
extract_stack�
extract_tb�format_exception�format_exception_only�format_list�format_stack�	format_tb�	print_exc�
format_exc�print_exception�
print_last�print_stack�print_tb�clear_frames�FrameSummary�StackSummary�TracebackException�
walk_stack�walk_tbc��|�tj}t�|�����D]}t||d����dS)zyPrint the list of tuples as returned by extract_tb() or
    extract_stack() as a formatted stack trace to the given file.N���file�end)�sys�stderrr�	from_list�format�print)�extracted_listr�items   �0/opt/alt/python311/lib64/python3.11/traceback.py�
print_listr$s[���|��z���&�&�~�6�6�=�=�?�?�'�'��
�d��2�&�&�&�&�&�'�'�c�Z�t�|�����S)a�Format a list of tuples or FrameSummary objects for printing.

    Given a list of tuples or FrameSummary objects as returned by
    extract_tb() or extract_stack(), return a list of strings ready
    for printing.

    Each string in the resulting list corresponds to the item with the
    same index in the argument list.  Each string ends in a newline;
    the strings may contain internal newlines as well, for those items
    whose source text line is not None.
    )rrr)r!s r#rrs$���!�!�.�1�1�8�8�:�:�:r%c�F�tt||���|���dS)aPrint up to 'limit' stack trace entries from the traceback 'tb'.

    If 'limit' is omitted or None, all entries are printed.  If 'file'
    is omitted or None, the output goes to sys.stderr; otherwise
    'file' should be an open file or file-like object with a write()
    method.
    ��limit�rN)r$r)�tbr)rs   r#rr/s*���z�"�E�*�*�*��6�6�6�6�6�6r%c�H�t||������S)z5A shorthand for 'format_list(extract_tb(tb, limit))'.r()rr�r+r)s  r#r
r
9s!���b��&�&�&�-�-�/�/�/r%c�T�t�t|��|���S)a#
    Return a StackSummary object representing a list of
    pre-processed entries from traceback.

    This is useful for alternate formatting of stack traces.  If
    'limit' is omitted or None, all entries are extracted.  A
    pre-processed stack trace entry is a FrameSummary object
    containing attributes filename, lineno, name, and line
    representing the information that is usually printed for a stack
    trace.  The line is a string with leading and trailing
    whitespace stripped; if the source is not available it is None.
    r()r� _extract_from_extended_frame_gen�_walk_tb_with_full_positionsr-s  r#rr=s.���8�8�$�R�(�(��9�7�7�7r%zG
The above exception was the direct cause of the following exception:

zF
During handling of the above exception, another exception occurred:

c��eZdZd�ZdS)�	_Sentinelc��dS)Nz
<implicit>���selfs r#�__repr__z_Sentinel.__repr__[s���|r%N)�__name__�
__module__�__qualname__r7r4r%r#r2r2Zs#����������r%r2c��|tu|tukrtd���||cxur	turJnnG|�Ct|t��r	||jfStdt
|��j�d����dS||fS)Nz-Both or neither of value and tb must be givenzException expected for value, z found�NN)�	_sentinel�
ValueError�
isinstance�
BaseException�
__traceback__�	TypeError�typer8)�exc�valuer+s   r#�_parse_value_tbrF`s���
����i��0�0��H�I�I�I�������i�������?��#�}�-�-�
.��C�-�-�-��:�#�C�y�y�1�:�:�:�;�;�
;��:��"�9�r%Tc��t|||��\}}tt|��|||d���}|�||���dS)a�Print exception up to 'limit' stack trace entries from 'tb' to 'file'.

    This differs from print_tb() in the following ways: (1) if
    traceback is not None, it prints a header "Traceback (most recent
    call last):"; (2) it prints the exception type and value after the
    stack trace; (3) if type is SyntaxError and value has the
    appropriate format, it prints the line where the syntax error
    occurred with a caret on the next line indicating the approximate
    position of the error.
    T�r)�compact�r�chainN)rFrrCr )rDrEr+r)rrK�tes       r#r
r
osS�� ��U�B�/�/�I�E�2�	�D��K�K���%��	N�	N�	N�B��H�H�$�e�H�$�$�$�$�$r%c��t|||��\}}tt|��|||d���}t|�|�����S)azFormat a stack trace and the exception information.

    The arguments have the same meaning as the corresponding arguments
    to print_exception().  The return value is a list of strings, each
    ending in a newline and some containing internal newlines.  When
    these lines are concatenated and printed, exactly the same text is
    printed as does print_exception().
    TrH�rK)rFrrC�listr)rDrEr+r)rKrLs      r#rr�sS�� ��U�B�/�/�I�E�2�	�D��K�K���%��	N�	N�	N�B���	�	��	�&�&�'�'�'r%c��|tur|}tt|��|dd���}t|�����S)a�Format the exception part of a traceback.

    The return value is a list of strings, each ending in a newline.

    The list contains the exception's message, which is
    normally a single string; however, for :exc:`SyntaxError` exceptions, it
    contains several lines that (when printed) display detailed information
    about where the syntax error occurred. Following the message, the list
    contains the exception's ``__notes__``.
    NT)rI)r=rrCrOr)rDrErLs   r#rr�sJ��
�	�����	�D��K�K���d�	C�	C�	C�B���(�(�*�*�+�+�+r%c�J�t|d��}|�|sd|z}n|�d|�d�}|S)N�	exceptionz%s
z: �
)�_safe_string)�etyperE�valuestr�lines    r#�_format_final_exc_linerX�s<���E�;�/�/�H��}�H�}���~���"�U�U�H�H�H�-���Kr%c�D�	||��S#d|�d|j�d�cYSxYw)N�<� z
() failed>)r8)rE�what�funcs   r#rTrT�s?��4��t�E�{�{���4�3�4�3�3�$�-�3�3�3�3�3�3���s�

�c�D�ttj��|||d��dS)z>Shorthand for 'print_exception(*sys.exc_info(), limit, file)'.�r)rrKN)r
r�exc_infor_s   r#rr�s%���S�\�^�^�5�t�5�I�I�I�I�I�Ir%c�d�d�ttj��||d����S)z%Like print_exc() but return a string.r�r)rK)�joinrrr`rbs  r#rr�s*��
�7�7�#�S�\�^�^�5��N�N�N�O�O�Or%c��ttd��std���ttjtjtj|||��dS)znThis is a shorthand for 'print_exception(sys.last_type,
    sys.last_value, sys.last_traceback, limit, file)'.�	last_typezno last exceptionN)�hasattrrr>r
re�
last_value�last_tracebackr_s   r#rr�sU���3��$�$�.��,�-�-�-��C�M�3�>�3�3E��4��(�(�(�(�(r%c�z�|�tj��j}tt	||���|���dS)z�Print a stack trace from its invocation point.

    The optional 'f' argument can be used to specify an alternate
    stack frame at which to start. The optional 'limit' and 'file'
    arguments have the same meaning as for print_exception().
    Nr(r*)r�	_getframe�f_backr$r)�fr)rs   r#rr�s=��	�y��M�O�O�"���}�Q�e�,�,�,�4�8�8�8�8�8�8r%c�r�|�tj��j}tt	||�����S)z5Shorthand for 'format_list(extract_stack(f, limit))'.Nr()rrjrkrr)rlr)s  r#r	r	�s0���y��M�O�O�"���}�Q�e�4�4�4�5�5�5r%c��|�tj��j}t�t|��|���}|���|S)asExtract the raw traceback from the current stack frame.

    The return value has the same format as for extract_tb().  The
    optional 'f' and 'limit' arguments have the same meaning as for
    print_stack().  Each item in the list is a quadruple (filename,
    line number, function name, text), and the entries are in order
    from oldest to newest stack frame.
    Nr()rrjrkr�extractr�reverse)rlr)�stacks   r#rr�sG��	�y��M�O�O�"��� � ��A���e� �<�<�E�	�M�M�O�O�O��Lr%c�v�|�6	|j���n#t$rYnwxYw|j}|�4dSdS)zEClear all references to local variables in the frames of a traceback.N)�tb_frame�clear�RuntimeError�tb_next�r+s r#rr�s[��
�.�	��K���������	�	�	��D�	�����Z��

�.�.�.�.�.s��
+�+c�v�eZdZdZdZddddddd�d�Zd�Zd�Zd	�Zd
�Z	d�Z
ed���Zed
���Z
dS)ra>Information about a single frame from a traceback.

    - :attr:`filename` The filename for the frame.
    - :attr:`lineno` The line within filename for the frame that was
      active when the frame was captured.
    - :attr:`name` The name of the function or method that was executing
      when the frame was captured.
    - :attr:`line` The text from the linecache module for the
      of code that was running when the frame was captured.
    - :attr:`locals` Either None if locals were not supplied, or a dict
      mapping the name to the repr() of the variable.
    )�filename�lineno�
end_lineno�colno�	end_colno�name�_line�localsTN)�lookup_liner�rWr{r|r}c���||_||_||_||_|r|j|rd�|���D��nd|_||_||_|	|_	dS)a�Construct a FrameSummary.

        :param lookup_line: If True, `linecache` is consulted for the source
            code line. Otherwise, the line will be looked up when first needed.
        :param locals: If supplied the frame locals, which will be captured as
            object representations.
        :param line: If provided, use this instead of looking up the line in
            the linecache.
        c�4�i|]\}}|t|����Sr4)�repr)�.0�k�vs   r#�
<dictcomp>z)FrameSummary.__init__.<locals>.<dictcomp>s$��=�=�=�d�a��q�$�q�'�'�=�=�=r%N)
ryrzr~rrW�itemsr�r{r|r})
r6ryrzr~r�r�rWr{r|r}s
          r#�__init__zFrameSummary.__init__sp��!��
������	���
��	��I�I�AG�Q�=�=�f�l�l�n�n�=�=�=�=�T���$�����
�"����r%c� �t|t��r@|j|jko/|j|jko|j|jko|j|jkSt|t��r|j|j|j|jf|kStS�N)	r?rryrzr~r��tuplerW�NotImplemented�r6�others  r#�__eq__zFrameSummary.__eq__s����e�\�*�*�	1��M�U�^�3�0��K�5�<�/�0��I���+�0��K�5�<�/�
1��e�U�#�#�	O��M�4�;��	�4�9�E��N�N��r%c�B�|j|j|j|jf|Sr�)ryrzr~rW)r6�poss  r#�__getitem__zFrameSummary.__getitem__&s���
�t�{�D�I�t�y�A�#�F�Fr%c�P�t|j|j|j|jg��Sr�)�iterryrzr~rWr5s r#�__iter__zFrameSummary.__iter__)s!���T�]�D�K���D�I�F�G�G�Gr%c�P�d�|j|j|j���S)Nz7<FrameSummary file {filename}, line {lineno} in {name}>)ryrzr~)rryrzr~r5s r#r7zFrameSummary.__repr__,s0��H�O�O��]�4�;�T�Y�P�H�H�	Hr%c��dS)N�r4r5s r#�__len__zFrameSummary.__len__0s���qr%c��|j|jSr�)rWrr5s r#�_original_linezFrameSummary._original_line3s��	
�	�	��z�r%c��|j�-|j�dStj|j|j��|_|j���Sr�)rrz�	linecache�getlinery�stripr5s r#rWzFrameSummary.line9sC���:���{�"��t�"�*�4�=�$�+�F�F�D�J��z���!�!�!r%)r8r9r:�__doc__�	__slots__r�r�r�r�r7r��propertyr�rWr4r%r#rr�s���������,�I�?C��d��4�4�#�#�#�#�#�.���G�G�G�H�H�H�H�H�H��������X��
�"�"��X�"�"�"r%rc#�K�|�'tj��jjjj}|�||jfV�|j}|�dSdS)z�Walk a stack yielding the frame and line number for each frame.

    This will follow f.f_back from the given frame. If no frame is given, the
    current stack is used. Usually used with StackSummary.extract.
    N)rrjrk�f_lineno)rls r#rrBsQ����	�y��M�O�O�"�)�0�7��
�-����m����
�H���-�-�-�-�-r%c#�DK�|�|j|jfV�|j}|�dSdS)z�Walk a traceback yielding the frame and line number for each frame.

    This will follow tb.tb_next (and thus is in the opposite order to
    walk_stack). Usually used with StackSummary.extract.
    N)rs�	tb_linenorvrws r#rrOs8����
�.��k�2�<�'�'�'�'�
�Z��
�.�.�.�.�.r%c#��K�|�Zt|jj|j��}|d�|j|jf|dd�zfV�n|j|fV�|j}|�XdSdS)Nr�)�_get_code_positionrs�f_code�tb_lastir�rv)r+�	positionss  r#r0r0Zs�����
�.�&�r�{�'9�2�;�G�G�	��Q�<���+���/�)�A�B�B�-�?�?�?�?�?�?��+�y�(�(�(�(�
�Z��
�.�.�.�.�.r%c��|dkrdS|���}ttj||dzd����S)Nr)NNNN�)�co_positions�next�	itertools�islice)�code�instruction_index�
positions_gens   r#r�r�hsG���1���'�'��%�%�'�'�M��	� ��0A�Q�0F��M�M�N�N�Nr%�c�t�eZdZdZedddd�d���Zedddd�d���Zed���Zd	�Zd
�Z	dS)rz?A list of FrameSummary objects, representing a stack of frames.NTF�r)�lookup_lines�capture_localsc�P���fd�}|�|��|||���S)aWCreate a StackSummary from a traceback or stack object.

        :param frame_gen: A generator that yields (frame, lineno) tuples
            whose summaries are to be included in the stack.
        :param limit: None to include all frames or the number of frames to
            include.
        :param lookup_lines: If True, lookup lines for each frame immediately,
            otherwise lookup is deferred until the frame is rendered.
        :param capture_locals: If True, the local variables from each frame will
            be captured as object representations into the FrameSummary.
        c3�0�K��D]\}}||dddffV��dSr�r4)rlrz�	frame_gens  �r#�extended_frame_genz0StackSummary.extract.<locals>.extended_frame_gen�sA�����&�
4�
4�	��6��&�$��d�3�3�3�3�3�3�
4�
4r%r�)r/)�klassr�r)r�r�r�s `    r#rozStackSummary.extracttsN���	4�	4�	4�	4�	4��5�5��� � ��L�)�6�+�+�	+r%c
�@�|� ttdd��}|�|dkrd}|�3|dkrtj||��}nt	j||���}|��}t
��}|D]�\}\}}	}
}|j}|j}
|j	}|�
|
��tj|
|j
��|r|j}nd}|�t!|
||d||	|
|�������|D]}
tj|
���|r|D]	}|j�
|S)N�tracebacklimitr)�maxlenF)r�r�r{r|r})�getattrrr�r��collections�deque�setr��co_filename�co_name�addr��	lazycache�	f_globals�f_locals�appendr�
checkcacherW)r�r�r)r�r��result�fnamesrlrzr{r|r}�coryr~r�s                r#r/z-StackSummary._extract_from_extended_frame_gen�s|���=��C�!1�4�8�8�E�� �U�Q�Y�Y�������z�z�%�,�Y��>�>�	�	�'�-�i���G�G�G�	����������9B�	J�	J�5�A�5��
�E�9���B��~�H��:�D��J�J�x� � � ����!�+�6�6�6��
 ��:������M�M�,��&�$�E�(�%�U�i�I�I�I�
J�
J�
J�
J��	+�	+�H�� ��*�*�*�*��	��
�
�������
r%c	���t��}|D]Z}t|t��r|�|���-|\}}}}|�t||||������[|S)z�
        Create a StackSummary object from a supplied list of
        FrameSummary objects or old-style list of tuples.
        �rW)rr?rr�)r��a_listr��frameryrzr~rWs        r#rzStackSummary.from_list�s�������	O�	O�E��%��.�.�
O��
�
�e�$�$�$�$�/4�,��&�$���
�
�l�8�V�T��M�M�M�N�N�N�N��
r%c�V�g}|�d�|j|j|j����|j�ru|j���}|�d�|����|j}t|��}t|j�	����}||z
}|j
���|j���t||j
��}t||j��}	|||	�}
d}|j|j
kr<tt��5t!|
��}ddd��n#1swxYwYn!t|�����}	|	|z
t|��ks|�r'|j|jz
dk�rt)||��dz}t)||	��dz}
|�d��|�d||z
z��|r�t)|
|j��}t)|
|j��}|�|j|z��|�|j||z
z��|�|j|
|z
|z
z��n|�d|
|z
z��|�d	��|jrVt1|j�����D]/\}}|�d
�||������0d�|��S)
z�Format the lines for a single FrameSummary.

        Returns a string representing one frame involved in the stack. This
        gets called for every frame to be printed in the stack summary.
        z  File "{}", line {}, in {}
�    {}
Nrr�z    r[�^rSz    {name} = {value}
)r~rEr)r�rryrzr~rWr�r��len�lstripr|r}� _byte_offset_to_character_offsetr{r�	Exception�(_extract_caret_anchors_from_line_segment�rstrip�right_start_offset�left_end_offset�_display_width�primary_char�secondary_charr��sortedr�rc)r6�
frame_summary�row�
stripped_linerW�
orig_line_len�frame_line_len�stripped_characters�start_offset�
end_offset�code_segment�anchors�dp_start_offset�
dp_end_offset�dp_left_end_offset�dp_right_start_offsetr~rEs                  r#�format_frame_summaryz!StackSummary.format_frame_summary�s������
�
�2�9�9��"�M�$8�-�:L�N�N�	O�	O�	O���0	%�)�.�4�4�6�6�M��J�J�z�(�(��7�7�8�8�8� �/�D���I�I�M� ��!3�!:�!:�!<�!<�=�=�N�"/�.�"@���#�/�!�+�7�?��-�-� /� /��=��-�1�3�3�
�#�L��$;�<���� �'�=�+C�C�C�!�)�,�,�Y�Y�"J�<�"X�"X��Y�Y�Y�Y�Y�Y�Y�Y�Y�Y�Y����Y�Y�Y�Y��
"%�T�[�[�]�]�!3�!3�J���,�s�=�/A�/A�A�A��B�$+�$>��AX�$X�[\�$\�$\�'5�T�<�&H�&H�1�&L�O�$2�4��$D�$D�q�$H�M��J�J�v�&�&�&��J�J�s�o�8K�&K�L�M�M�M��L�-;�L�'�Ja�-b�-b�*�0>�|�W�Mg�0h�0h�-��
�
�7�#7�:L�#L�M�M�M��
�
�7�#9�=R�Ug�=g�#h�i�i�i��
�
�7�#7�=�?�;Z�]r�;r�#s�t�t�t�t��
�
�3�-�/�*I�#J�K�K�K��J�J�t�$�$�$���	T�%�m�&:�&@�&@�&B�&B�C�C�
T�
T���e��
�
�3�:�:��E�:�R�R�S�S�S�S��w�w�s�|�|�s�0E�E�Ec��g}d}d}d}d}|D]�}|�|��}|��|�%||jks|�||jks
|�||jkrP|tkr.|tz}|�d|�d|dkrdnd�d���|j}|j}|j}d}|dz
}|tkr��|�|����|tkr.|tz}|�d|�d|dkrdnd�d���|S)	aFormat the stack ready for printing.

        Returns a list of strings ready for printing.  Each string in the
        resulting list corresponds to a single frame from the stack.
        Each string ends in a newline; the strings may contain internal
        newlines as well, for those items with source text lines.

        For long sequences of the same frame and line, the first few
        repetitions are shown, followed by a summary line stating the exact
        number of further repetitions.
        Nrz  [Previous line repeated z
 more timer��srz]
)r�ryrzr~�_RECURSIVE_CUTOFFr�)r6r��	last_file�	last_line�	last_name�countr��formatted_frames        r#rzStackSummary.formats������	��	��	���!�	+�	+�M�"�7�7�
�F�F�O��&���!�Y�-�2H�%H�%H��!�Y�-�2F�%F�%F��!�Y�-�2D�%D�%D��,�,�,��.�.�E��M�M�=�U�=�=�&+�a�i�i�s�s�R�=�=�=����*�2�	�)�0�	�)�.�	����Q�J�E��(�(�(���M�M�/�*�*�*�*��$�$�$��&�&�E��M�M�5�U�5�5�#�a�i�i�s�s�R�5�5�5�
�
�
��
r%)
r8r9r:r��classmethodror/rr�rr4r%r#rrqs�������I�I��+/�d� �+�+�+�+��[�+�*�DH��e�'�'�'�'��[�'�R����[��$?�?�?�B-�-�-�-�-r%rc��|�d��}t|d|��dd�����S)Nzutf-8�replace)�errors)�encoder��decode)�str�offset�as_utf8s   r#r�r�8s=���j�j��!�!�G��w�w��w��&�&�w�y�&�A�A�B�B�Br%�_Anchors)r�r�r�r��~r�)�defaultsc���ddl}	|����}n#t$rYdSwxYwt|j��dkrdS�fd�}|jd}||jd�x���\}|x|jd�x��F\||jj��}||j	j
��}�||�}t|��t|�����z
}	|jj|	z}
|
dz}|	dzt|��kr"||	dz���s|dz
}|
t���kr]�|
x}���s|dvr=|
dz
}
|dz
}|
t���kr �|
x}����9|dv�=t||
��||����S|jd�x��5\||jj��}
||jjdz��}|
t���kr\�|
x}���s|dkr:|
dz
}
|
t���kr"�|
x}����4|dk�:|t���kr\�|x}���s|dkr:|dz
}|t���kr"�|x}����4|dk�:|t���kr|dz
}t|
|��SndS)Nrr�c�$��t�|��Sr�)r�)r�segments �r#�<lambda>z:_extract_caret_anchors_from_line_segment.<locals>.<lambda>Ss���?���P�P�r%r4z)#�[�])�ast�parse�SyntaxErrorr��body�Expr�BinOp�left�end_col_offset�right�
col_offsetr��isspacer�	SubscriptrE�slice)
rr�tree�	normalize�	statement�expr�operator_start�operator_end�operator_str�operator_offset�left_anchor�right_anchor�chs
`            r#r�r�Hs�����J�J�J���y�y��!�!���������t�t������4�9�~�~�����t�P�P�P�P�I��	�!��I�
�
�X�^�^�^�^�^�d�� �S�Y�[�[�[�[�[�[�%.�Y�t�y�/G�%H�%H�N�#,�9�T�Z�-B�#C�#C�L�#*�>�,�+F�#G�L�&)�,�&7�&7�#�l�>Q�>Q�>S�>S�:T�:T�&T�O�"&�)�":�_�"L�K�#.��?�L�'�!�+�c�,�.?�.?�?�?� ,�_�q�-@� A� I� I� K� K�@�%��)��%��G���4�4���AU�;U�2�:^�:^�:`�:`�4�df�jn�dn�dn�#�q�(��$��)��&��G���4�4���AU�;U�2�:^�:^�:`�:`�4�df�jn�dn�dn�$�I�I�k�$:�$:�I�I�l�<S�<S�T�T�T�#!�$�]�_�_�_�_�_�"+�)�D�J�,E�"F�"F�K�#,�9�T�Z�-F��-J�#K�#K�L�%��G���4�4���AU�;U�2�:^�:^�:`�:`�4�df�jm�dm�dm�#�q�(��&��G���4�4���AU�;U�2�:^�:^�:`�:`�4�df�jm�dm�dm�&��W���5�5�'�,�BW�<W�B�;`�;`�;b�;b�5�fh�lo�fo�fo�$��)��'��W���5�5�'�,�BW�<W�B�;`�;`�;b�;b�5�fh�lo�fo�fo�#�c�'�l�l�2�2�$��)��#�K��>�>�>�%�_�)�>�4s��
+�+�WFc�~��|���r|Sddl�t�fd�|d|�D����S)z�Calculate the extra amount of width space the given source
    code segment might take if it were to be displayed on a fixed
    width output device. Supports wide unicode characters and emojis.rNc3�X�K�|]$}��|��tvrdndV��%dS)r�r�N)�east_asian_width�_WIDE_CHAR_SPECIFIERS)r��char�unicodedatas  �r#�	<genexpr>z!_display_width.<locals>.<genexpr>�sT���������
)�
)�$�
/�
/�3H�
H�
H���a������r%)�isasciir.�sum)rWrr.s  @r#r�r�ysf����|�|�~�~���
������������&��M������r%c�"�eZdZd�Zd�Zdd�ZdS)�_ExceptionPrintContextc�H�t��|_d|_d|_dS)NrF)r��seen�exception_group_depth�
need_closer5s r#r�z_ExceptionPrintContext.__init__�s ���E�E��	�%&��"�����r%c��dd|jzzS)Nr[r�)r6r5s r#�indentz_ExceptionPrintContext.indent�s���a�$�4�4�5�5r%Nc#��K�|�d}|���}|jr||dzz
}t|t��rt	j||d���V�dS|D]}t	j||d���V��dS)N�|r[c��dS�NTr4r�s r#r
z-_ExceptionPrintContext.emit.<locals>.<lambda>����T�r%c��dSr=r4r�s r#r
z-_ExceptionPrintContext.emit.<locals>.<lambda>�r>r%)r9r6r?r�textwrap)r6�text_gen�margin_char�
indent_str�texts     r#�emitz_ExceptionPrintContext.emit�s��������K��[�[�]�]�
��%�	,��+��+�+�J��h��$�$�	K��/�(�J�8I�8I�J�J�J�J�J�J�J� �
K�
K���o�d�J�8I�8I�J�J�J�J�J�J�
K�
Kr%r�)r8r9r:r�r9rEr4r%r#r3r3�sL������ � � �
6�6�6�K�K�K�K�K�Kr%r3c�z�eZdZdZdddddddd�d�Zed	���Zd
�Zd�Zd�Z	d
�Z
d�Zddd�d�Zddd�d�Z
dS)ra�An exception ready for rendering.

    The traceback module captures enough attributes from the original exception
    to this intermediary form to ensure that no references are held, while
    still being able to fully print or format it.

    max_group_width and max_group_depth control the formatting of exception
    groups. The depth refers to the nesting level of the group, and the width
    refers to the size of a single exception group's exceptions array. The
    formatted output is truncated when either limit is exceeded.

    Use `from_exception` to create TracebackException instances from exception
    objects, or the constructor to create TracebackException instances from
    individual components.

    - :attr:`__cause__` A TracebackException of the original *__cause__*.
    - :attr:`__context__` A TracebackException of the original *__context__*.
    - :attr:`exceptions` For exception groups - a list of TracebackException
      instances for the nested *exceptions*.  ``None`` for other exceptions.
    - :attr:`__suppress_context__` The *__suppress_context__* value from the
      original exception.
    - :attr:`stack` A `StackSummary` representing the traceback.
    - :attr:`exc_type` The class of the original traceback.
    - :attr:`filename` For syntax errors - the filename where the error
      occurred.
    - :attr:`lineno` For syntax errors - the linenumber where the error
      occurred.
    - :attr:`end_lineno` For syntax errors - the end linenumber where the error
      occurred. Can be `None` if not present.
    - :attr:`text` For syntax errors - the text where the error
      occurred.
    - :attr:`offset` For syntax errors - the offset into the text where the
      error occurred.
    - :attr:`end_offset` For syntax errors - the end offset into the text where
      the error occurred. Can be `None` if not present.
    - :attr:`msg` For syntax errors - the compiler error message.
    NTF��
)r)r�r�rI�max_group_width�max_group_depth�_seenc��|
du}|
�t��}
|
�t|����||_|	|_t
�t|��|||���|_||_	t|d��|_	t|dd��|_
n6#t$r)}dt|dt����g|_
Yd}~nd}~wwxYw|r�t!|t"��rz|j|_|j}
|
�t)|
��nd|_|j}|�t)|��nd|_|j|_|j|_|j|_|j|_|r|���|�|jnd|_|�s�||fg}|�r�|���\}}|rW|j�Pt|j��|
vr:t=t?|j��|j|jj |||||	|
��	�	}nd}|r|duo|duo|j}nd}|rY|j!�R|rPt|j!��|
vr:t=t?|j!��|j!|j!j |||||	|
��	�	}nd}|ratE|tF��rLg}|j$D]A}t=t?|��||j |||||	|
��	�	}|�%|���Bnd}||_||_!||_$|r!|�%|j|jf��|r!|�%|j!|j!f��|r-|�&tO|j$|j$����|���dSdSdS)Nr�rR�	__notes__z!Ignored error getting __notes__: F)r)r�r�rIrJrKT)(r�r��idrIrJrr/r0rq�exc_typerT�_strr�rMr�r��
issubclassrryrzrr{rDrr��msg�_load_lines�__suppress_context__�pop�	__cause__rrCrA�__context__r?�BaseExceptionGroup�
exceptionsr��extend�zip)r6rO�	exc_value�
exc_tracebackr)r�r�rIrIrJrK�is_recursive_call�e�lno�end_lno�queuerL�cause�need_context�contextrYrD�texcs                       r#r�zTracebackException.__init__�sA��"��-���=��E�E�E�
�	�	�"�Y�-�-� � � �.���.���!�B�B�(��7�7��l�)�C�+�+��
�!��
�!��K�8�8��	�	Z�$�Y��T�B�B�D�N�N���	Z�	Z�	Z�X�L��K�QU�4V�4V�X�X�Z�D�N�N�N�N�N�N�����	Z�����
	%�
�8�[�9�9�
	%�%�.�D�M��"�C�&)�o�#�c�(�(�(�4�D�K��*�G�.5�.A�c�'�l�l�l�t�D�O�!��D�I�#�*�D�K�'�2�D�O� �}�D�H��	�������.7�.C�I�*�*��	
�!�
!�A	C��I�&�'�E��?
C��	�	�����A��
!�!�+�1��1�;���u�4�4�.��Q�[�)�)�����1�#�%1�'5�(7�(7�#�	%�	%�	%�E�E�!�E��(�$)�T�M�%?�$%�T�M�%?�()�(>�$>�!�L�$(�L��
#�!�-�3�$�4�)+�A�M�):�):�%�)G�)G�0��Q�]�+�+��
��
�3�#�%1�'5�(7�(7�#�	%�	%�	%�G�G�#�G��&��A�'9�:�:�&�!#�J� �|�0�0��1� ��I�I���-�"'�)5�+9�,;�,;�"'�	 )�	 )�	 )��#�)�)�$�/�/�/�/�0�"&�J�$���!(��� *��
��>��L�L�"�,���!<�=�=�=��B��L�L�"�.�!�-�!@�A�A�A��C��L�L��R�]�A�L�!A�!A�B�B�B��?
C�?
C�?
C�A	C�A	C�?
C�?
Cs�B)�)
C�3C�Cc�B�|t|��||jg|�Ri|��S)z.Create a TracebackException from an exception.)rCrA)�clsrD�args�kwargss    r#�from_exceptionz!TracebackException.from_exception;s1���s�4��9�9�c�3�#4�F�t�F�F�F�v�F�F�Fr%c�(�|jD]	}|j�
dS)z7Private API. force all lines in the stack to be loaded.N)rqrW)r6r�s  r#rSzTracebackException._load_lines@s&���Z�	�	�E��J�J�J�	�	r%c�Z�t|t��r|j|jkStSr�)r?r�__dict__r�r�s  r#r�zTracebackException.__eq__Es*���e�/�0�0�	3��=�E�N�2�2��r%c��|jSr�)rPr5s r#�__str__zTracebackException.__str__Js
���y�r%c#�rK�|j�td|j��V�dS|jj}|jj}|dvrt|t��sd}|dz|z}t|jt��st||j��V�n|�	|��Ed{V��t|j
tjj
��rA|j
D]7}t|d��}d�|�d��D��Ed{V���8dS|j
� t|j
dt �	��V�dSdS)
a�Format the exception part of the traceback.

        The return value is a generator of strings, each ending in a newline.

        Generator yields the exception message.
        For :exc:`SyntaxError` exceptions, it
        also yields (before the exception message)
        several lines that (when printed)
        display detailed information about where the syntax error occurred.
        Following the message, generator also yields
        all the exception's ``__notes__``.
        N)�__main__�builtinsz	<unknown>�.�notec��g|]}|dz��S)rSr4)r��ls  r#�
<listcomp>z<TracebackException.format_exception_only.<locals>.<listcomp>ls��?�?�?��A��H�?�?�?r%rSrM)r])rOrXrPr:r9r?rrQr�_format_syntax_errorrMr��abc�SequencerT�splitr�)r6�stype�smodrus    r#rz(TracebackException.format_exception_onlyMsy�����=� �(��t�y�9�9�9�9�9��F��
�*���}�'���/�/�/��d�C�(�(�
#�"���3�J��&�E��$�-��5�5�	8�(���	�:�:�:�:�:�:��0�0��7�7�7�7�7�7�7�7�7��d�n�k�o�&>�?�?�	G���
@�
@��#�D�&�1�1��?�?�d�j�j��.>�.>�?�?�?�?�?�?�?�?�?�?�?�
@�
@��^�
'��t�~�{��F�F�F�F�F�F�F�F�(�
'r%c#��K�d}|j�%d�|jpd|j��V�n!|j�d�|j��}|j}|��|�d��}|�d��}t
|��t
|��z
}d�|��V�|j��|j}|jd	vr|jn|}||ks|d
kr|dz}|dz
|z
}	|dz
|z
}
|	dkrHd
�|d|	�D��}d�d�	|��d|
|	z
zdz��V�|j
pd}d�|||��V�dS)z0Format SyntaxError exceptions (internal helper).rNz  File "{}", line {}
z<string>z ({})rSz 
r�>Nr���r�rc3�FK�|]}|���r|ndV��dS)r[N)r)r��cs  r#r/z:TracebackException._format_syntax_error.<locals>.<genexpr>�s3����!U�!U�!��	�	���#<�1�1��!U�!U�!U�!U�!U�!Ur%z    {}{}r�z<no detail available>z	{}: {}{}
)rzrryrDr�r�r�rr�rcrR)
r6r}�filename_suffixrD�rtext�ltext�spacesrr�r|r}�
caretspacerRs
             r#ryz'TracebackException._format_syntax_errorps��������;�"�*�1�1��
�+��T�[�:�:�
:�
:�
:�
:�
�]�
&�%�n�n�T�]�;�;�O��y�����K�K��%�%�E��L�L��)�)�E���Z�Z�#�e�*�*�,�F��#�#�E�*�*�*�*�*��{�&����04��y�0P�0P�T�_�_�V\�
��Z�'�'�:��+;�+;�!'�!��J���
�V�+��&��N�V�3�	��A�:�:�!U�!U�u�V�e�V�}�!U�!U�!U�J�$�+�+�B�G�G�J�,?�,?�#��UZ�IZ�B[�^b�Bb�d�d�d�d�d��h�1�1���!�!�%��o�>�>�>�>�>�>�>r%�rK�_ctxc	#�K�|�t��}g}|}|rU|rR|j�t}|j}n!|j�|jst
}|j}nd}d}|�||f��|}|�Rn|�d|f��t|��D�]�\}}|�|�|��Ed{V��|j	��|j
rM|�d��Ed{V��|�|j
�����Ed{V��|�|�����Ed{V����|j
|jkr%|�d|j�d���Ed{V����|j
dk}|r|xj
dz
c_
|j
rS|�d|rdnd�	��Ed{V��|�|j
�����Ed{V��|�|�����Ed{V��t|j	��}	|	|jkr|	}
n
|jdz}
d
|_t%|
��D�]}||
dz
k}|rd|_|j�||jk}
nd
}
|
s|dz�nd}|���|dkrd
ndzd|�d�zV�|xj
dz
c_
|
s)|j	|�||���Ed{V��n6|	|jz
}|dkrdnd}|�d|�d|�d���Ed{V��|r'|jr |���dzV�d
|_|xj
dzc_
��|r|j
dksJ�d|_
���dS)a�Format the exception.

        If chain is not *True*, *__cause__* and *__context__* will not be formatted.

        The return value is a generator of strings, each ending in a newline and
        some containing internal newlines. `print_exception` is a wrapper around
        this method which just prints the lines to a file.

        The message indicating which exception occurred is always the last
        string in the output.
        Nz#Traceback (most recent call last):
z... (max_group_depth is z)
rr�z3Exception Group Traceback (most recent call last):
�+)rBFTz...z+-z  z+---------------- z ----------------
r�r�rzand z more exceptionrSz&+------------------------------------
)r3rV�_cause_messagerWrT�_context_messager��reversedrErYrqrrr6rJr�rIr7�ranger9)r6rKr��outputrD�chained_msg�chained_excrR�is_toplevel�num_excs�n�i�last_exc�	truncated�title�	remaining�plurals                 r#rzTracebackException.format�s
�����<�)�+�+�D������	'��

"��=�,�"0�K�"%�-�K�K��o�2��2�3�"2�K�"%�/�K�K�"&�K�"&�K��
�
�{�C�0�1�1�1�!���

"��
�M�M�4��+�&�&�&� ��(�(�>	3�>	3�H�C�����9�9�S�>�>�)�)�)�)�)�)�)��~�%��9�=�#�y�y�)O�P�P�P�P�P�P�P�P�P�#�y�y���)9�)9�);�);�<�<�<�<�<�<�<�<�<��9�9�S�%>�%>�%@�%@�A�A�A�A�A�A�A�A�A�A��+�d�.B�B�B��9�9�H�t�/C�H�H�H�J�J�J�J�J�J�J�J�J�J� $�9�Q�>���4��.�.�!�3�.�.��9�=�#�y�y�N�-8�&B�c�c�d� )� D� D�D�D�D�D�D�D�D� $�y�y���)9�)9�);�);�<�<�<�<�<�<�<�<�<��9�9�S�%>�%>�%@�%@�A�A�A�A�A�A�A�A�A��s�~�.�.���t�3�3�3� �A�A��,�q�0�A�"'����q���4�4�A� !�Q�q�S��H��/�*.����+�7�%&�$�*>�%>�	�	�$)�	�,5�@�q��s�H�H�5�E��;�;�=�=�$%�q�D�D�D�D�d�4�J��J�J�J�K�L�L�L��.�.�!�3�.�.�$�I�#&�>�!�#4�#;�#;�%�d�#;�#S�#S�S�S�S�S�S�S�S�S�$,�t�/C�$C�	�(1�A�
�
���2��#'�9�9�G�9�G�G�V�G�G�G�$I�$I�I�I�I�I�I�I�I� �0�D�O�0�#�{�{�}�}�H� I�J�J�J�*/����.�.�!�3�.�.�.��3��5��:�:�:�:�12�D�.��}>	3�>	3r%rJc�x�|�tj}|�|���D]}t||d����dS)z7Print the result of self.format(chain=chain) to 'file'.NrNrr)rrrr )r6rrKrWs    r#r zTracebackException.print�sM���<��:�D��K�K�e�K�,�,�	+�	+�D��$�T�r�*�*�*�*�*�	+�	+r%)r8r9r:r�r�r�rkrSr�rprryrr r4r%r#rr�s������$�$�LEI��e�U���$�pC�pC�pC�pC�pC�d�G�G��[�G����
���
���!G�!G�!G�F"?�"?�"?�H#��b3�b3�b3�b3�b3�J!��+�+�+�+�+�+�+r%rr�r<)NNTr=)NNN)1r��collections.abcr�r�r�rr@�
contextlibr�__all__r$rrr
rr�r�r2r=rFr
rrrXrrTrrrrr	rrrrrr0r�r�rOrr��
namedtuplerr�r,r�r3rr4r%r#�<module>r�s���F�F�������������
�
�
�
�����������$�$�$��'�'�'�'�;�;�;�$7�7�7�7�0�0�0�0�7�7�7�7�*&��
&��
��������
�I�K�K�	����#,�	���T�%�%�%�%�"$-��$��(�(�(�(�)2�,�,�,�,�&���$'�4�4�4�4�J�J�J�J�P�P�P�P�(�(�(�(�	9�	9�	9�	9�6�6�6�6�
�
�
�
� ���K"�K"�K"�K"�K"�K"�K"�K"�\
�
�
�������O�O�O���D�D�D�D�D�4�D�D�D�NC�C�C�
"�;�!������3�Z�	�	�	��-�-�-�^�����$K�K�K�K�K�K�K�K�.\+�\+�\+�\+�\+�\+�\+�\+�\+�\+r%

Zerion Mini Shell 1.0