OwlCyberSecurity - MANAGER
Edit File: trace.cpython-311.opt-1.pyc
� �����/�gr����������������������� ����d�Z�ddgZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlZddl mZ�ddlZdZ�G�d��d������������Zd ��Zd ��Z�G�d��d������������Zd��Zd ��Zdd�Zd��Z�G�d��d������������Zd��Zedk����r�e���������������dS�dS�)a���program/module to trace Python program or function execution Sample use, command line: trace.py -c -f counts --ignore-dir '$prefix' spam.py eggs trace.py -t --ignore-dir '$prefix' spam.py eggs trace.py --trackcalls spam.py eggs Sample use, programmatically import sys # create a Trace object, telling it what to ignore, and whether to # do tracing or line-counting or both. tracer = trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,], trace=0, count=1) # run the new command using the given tracer tracer.run('main()') # make a report, placing output in /tmp r = tracer.results() r.write_results(show_missing=True, coverdir="/tmp") �Trace�CoverageResults�����N)� monotonicz#pragma NO COVERc�������������������������e�Zd�Zdd�Zd��ZdS�)�_IgnoreNc�����������������������|st������������������������nt����������|������������|�_��������|sg�nd��|D���������������|�_��������ddi|�_��������d�S�)Nc������������������L�����g�|�]!}t�����������j�����������������������������|��������������"S���)�os�path�normpath��.0�ds��� �,/opt/alt/python311/lib64/python3.11/trace.py� <listcomp>z$_Ignore.__init__.<locals>.<listcomp>H���s8�������*9��*9��*9�./��+-�'�*:�*:�1�*=�*=��*9��*9��*9�����z<string>����)�set�_mods�_dirs�_ignore)�self�modules�dirss��� r����__init__z_Ignore.__init__F���sX������")�;�S�U�U�U�s�7�|�|�� �#��9�R�R��*9��*9�37�*9��*9��*9�� �#�Q�(����r���c������������������\����||�j���������v�r |�j���������|���������S�||�j��������v�rd|�j���������|<���dS�|�j��������D�]'}|���������������������|dz���������������r d|�j���������|<����dS��(|�d|�j���������|<���dS�|�j��������D�]1}|���������������������|t����������j��������z���������������r d|�j���������|<����dS��2d|�j���������|<���dS�)Nr����.r���)r���r���� startswithr���r����sep)r����filename� modulename�modr���s��� r����namesz _Ignore.namesL���s����������%�%��<� �+�+�����#�#�'(�D�L��$��1���:�� �� �C���$�$�S�3�Y�/�/�� �+,���Z�(��q�q� � ���'(�D�L��$��1����� �� �A���"�"�1�r�v�:�.�.�� �+,���Z�(��q�q� � �$%���Z� ��qr����NN)�__name__� __module__�__qualname__r���r$���r ���r���r���r���r���E���s7��������������)��)��)��)�)��)��)��)��)r���r���c�����������������������t�����������j�����������������������������|�������������}t�����������j�����������������������������|������������\��}}|S�)�,Return a plausible module name for the path.)r���r����basename�splitext)r����baser!����exts��� r����_modnamer/���w���s7��������7���D�!�!�D��G�$�$�T�*�*�M�H�c��Or���c�����������������������t�����������j�����������������������������|�������������}d}t����������j��������D�]{}t�����������j�����������������������������|������������}|���������������������|������������rE|t����������|���������������������t�����������j��������k����r"t����������|������������t����������|������������k����r|}�||r|�t����������|������������dz���d����������}n|�}t�����������j�����������������������������|������������\��}}|���������������������t�����������j��������d������������}t�����������j ��������r |���������������������t�����������j ��������d������������}t�����������j��������� ��������������������|������������\��}}|���������������������d������������S�)r*�����r���Nr���)r���r����normcase�sysr����lenr ���� splitdrive�replace�altsepr,����lstrip)r����comparepath�longest�dirr-����driver!���r.���s��� r����_fullmodnamer=���~���s0�������'�"�"�4�(�(�K��G��x�������g���s�#�#���!�!�#�&�&�� �;�s�3�x�x�+@�B�F�+J�+J��3�x�x�#�g�,�,�&�&��������C��L�L�1�$�%�%�&������'�$�$�T�*�*�K�E�4��<�<����$�$�D� �y��,��|�|�B�I�s�+�+���G�$�$�T�*�*�M�H�c��?�?�3���r���c��������������������6�����e�Zd�Z � �d d�Zd��Zd��Zd d�Zdd�ZdS�)r���Nc�����������������������||�_���������|�j����������i�|�_���������|�j��������������������������������������������|�_��������||�_��������|�j���������i�|�_��������|�j�������������������������������������������|�_��������||�_��������|�j���������i�|�_��������|�j�������������������������������������������|�_��������||�_��������||�_��������|�j��������r� �t����������|�j��������d������������5�}t����������j ��������|������������\��}}}d�d�d��������������n#�1�swxY�w�Y���|�� ��������������������|����������������������|||��������������������������d�S�#�t����������t����������t����������f$�r1}t����������d|�j���������d|��t ����������j����������������������Y�d�}~d�S�d�}~ww�xY�wd�S�)N�rb)�callerszSkipping counts file �: ��file)�counts�copy�counter�calledfuncsrA����infile�outfile�open�pickle�load�update� __class__�OSError�EOFError� ValueError�printr3����stderr)r���rE���rH���rI���rA���rJ����f�errs��� r���r���zCoverageResults.__init__����s����������;���D�K��{�'�'�)�)���&�����#�!�D���+�0�0�2�2�������<���D�L��|�(�(�*�*����������;�� N� N��$�+�t�,�,��B��39�;�q�>�>�0�F�K��B��B��B��B��B��B��B��B��B��B��B�����B��B��B��B����D�N�N�6�;��N�P�P�Q�Q�Q�Q�Q���X�z�2�� N�� N�� N���)-����c�c�;�BE�*�N��N��N��N��N��N��N��N��N��N����� N���� N�� Ns<����0D"��C*�D"��*C.�.D"��1C.�2.D"��"E*�9&E%�%E*c������������������V�����|����������������������d������������o|���������������������d������������S�)z_Return True if the filename does not refer to a file we want to have reported. �<�>)r����endswith)r���r!���s��� r����is_ignored_filenamez#CoverageResults.is_ignored_filename����s+��������"�"�3�'�'�B�H�,=�,=�c�,B�,B�Br���c������������������������|�j���������}|�j��������}|�j��������}|j���������}|j��������}|j��������}|D�]$}|���������������������|d������������||���������z���||<����%|D�]}d||<����|D�]}d||<����dS�)z.Merge in the data from another CoverageResultsr���r���N)rE���rH���rA����get) r����otherrE���rH���rA����other_counts�other_calledfuncs� other_callers�keys ��� r���rN���zCoverageResults.update����s�����������&���,���|��!�-��� � ��� A�� A�C� �*�*�S�!�,�,�|�C�/@�@�F�3�K�K�$�� !�� !�C� �K���� �� �� �C��G�C�L�L� �� r���TFc������������������r����|�j���������rRt�������������������������t����������d�������������|�j���������}t����������|������������D�]\��}}}t����������d|�d|�d|����������������|�j��������r�t�������������������������t����������d�������������dx}} t����������|�j��������������������D�]o\��\��} }}\��} }}| |k����r#t�������������������������t����������d| d�������������| }d} | | k����r| | k����rt����������d| �������������| } t����������d |�d |�d|�d |����������������pi�}|�j��������D�]2\��}}|���������������������|i�������������x}||<���|�j��������||f���������||<����3i�}|�����������������������������������D��]}\��}}|����������������������|������������r�|���������������������d������������r |d d����������}|�Lt����������j �����������������������������t����������j �����������������������������|������������������������}t����������|������������}n'|}t����������j��������|d��������������t����������|������������}|rt!����������|������������}ni�}t#����������j��������|������������}t����������j �����������������������������||dz���������������}t)����������|d������������5�}t+����������j��������|j��������������������\��}}d d d �������������n#�1�swxY�w�Y���|����������������������|||||������������\��}}|r |rt3����������d|z��|z��������������}||||f||<�����|rH|rFt����������d�������������t����������|������������D�]'}||���������\��}}}}t����������d||���������z����������������(|�j��������r� �t)����������|�j��������d������������5�} t7����������j��������|�j��������|�j���������|�j��������f| d�������������d d d �������������d S�#�1�swxY�w�Y���d S�#�t:����������$�r)}!t����������d|!z��t<����������j����������������������Y�d }!~!d S�d }!~!ww�xY�wd S�)af�� Write the coverage results. :param show_missing: Show lines that had no hits. :param summary: Include coverage summary per module. :param coverdir: If None, the results of each module are placed in its directory, otherwise it is included in the directory specified. zfunctions called:z filename: z, modulename: �, funcname: zcalling relationships:r1���z***z -->z r���z -> z.pycN���T)�exist_okz.coverr@����d���zlines cov% module (path)z%5d %3d%% %s (%s)�wbr���z"Can't save counts files because %srC���) rH���rS����sortedrA���rE���r]����itemsr[���rZ���r���r����dirname�abspathr/����makedirsr=����_find_executable_linenos� linecache�getlines�joinrK����tokenize�detect_encoding�readline�write_results_file�intrJ���rL����dumprP���r3���rT���)"r����show_missing�summary�coverdir�callsr!���r"����funcname�lastfile� lastcfile�pfile�pmod�pfunc�cfile�cmod�cfunc�per_file�lineno� lines_hit�sums�countr;����lnotab�source� coverpath�fp�encoding�_�n_hits�n_lines�percent�mrU���rV���s"��� r���� write_resultszCoverageResults.write_results����s��������� <��G�G�G��%�&�&�&��$�E�28��-�-�� <�� <�.��*�h���"�(�(�J�J�J���:��<��<��<��<���<�� I��G�G�G��*�+�+�+�#%�%�H�y��d�l�+�+� I�� I�<�%�%��u�';��t�U��H�$�$��G�G�G��%���.�.�.�$�H� "�I��E�>�>�i�5�&8�&8��'�5�)�)�)� %�I���d�d�d�E�E�E�4�4�4���G�H�H�H�H���� $��� @�� @��H�f�-5�\�\�(�B�-G�-G�G�I���*� $��X�v�,>� ?�I�f������'�~�~�/�/�� J�� J�O�H�e��'�'��1�1�� ��� � ��(�(�� )�#�C�R�C�=�����g�o�o�b�g�o�o�h�&?�&?�@�@��%�h�/�/� � �����C�$�/�/�/�/�)�(�3�3� ���� �1�(�;�;������'��1�1�F�����S�*�x�*?�@�@�I��h��%�%�� D��&�6�r�{�C�C���!� D�� D�� D�� D�� D�� D�� D�� D�� D�� D�� D����� D�� D�� D�� D�"�5�5�i��6<�e�X�O��O�O�F�G��� J�7�� J��c�F�l�W�4�5�5��#*�G�Z��#I��Z� ����� ;�t�� ;��2�3�3�3��D�\�\�� ;�� ;��9=�a��6���*�h��/�$�q�'�9�:�:�:�:��<�� S� S��$�,��-�-��&���K���d�.>��� M� !�1�&��&��&�&��&��&��&��&��&��&��&��&��&��&��&�����&��&��&��&��&��&����� S�� S�� S��:�S�@�s�z�R�R�R�R�R�R�R�R�R�R����� S���� S�� SsN����#J�J �J �)N��>)M4�'N��4M8�8N��;M8�<N�� N4�N/�/N4c������������������4���� �t����������|d|�������������}n:#�t����������$�r-}t����������d|�d|�d�t����������j����������������������Y�d}~dS�d}~ww�xY�wd }d } |5��t����������|d ������������D�]�\��} }| |v�r)|���������������������d|| ���������z���������������| d z ��} |d z ��}n=| |v�r$t����������|vr|���������������������d�������������|d z ��}n|���������������������d �������������|���������������������|���������������������d��������������������������� �ddd�������������n#�1�swxY�w�Y���| |fS�)z'Return a coverage results file in path.�w�r����ztrace: Could not open z for writing: z - skippingrC���N)r���r���r���r���z%5d: z>>>>>> z ����) rK���rP���rS���r3���rT���� enumerate�write�PRAGMA_NOCOVER� expandtabs)r���r����linesr����r����r����rJ���rV���r����r����r�����lines��� r���ru���z"CoverageResults.write_results_file(��s������ ��4��x�8�8�8�G�G���� �� �� ��E�26�$�$����=�DG�J� P�� P�� P�� P��4�4�4�4�4����� ���� ����� �� 2�� 2� )�%�� 3� 3�� 2�� 2������Y�&�&��M�M�'�I�f�,=�"=�>�>�>��a�K�F��q�L�G�G��v�%�%�n��.D�.D���M�M�)�,�,�,��q�L�G�G��M�M�)�,�,�,�� � �d�o�o�a�0�0�1�1�1�1� 2� 2�� 2�� 2�� 2�� 2�� 2�� 2�� 2�� 2�� 2�� 2����� 2�� 2�� 2�� 2�"��w��s'������ A�"A�A�B)D�D�D)NNNNN)TFN�N)r&���r'���r(���r���r[���rN���r����ru���r ���r���r���r���r�������s���������������=A�'+�N��N��N��N�4C��C��C������$YS��YS��YS��YS�v����������r���c������������������P�����i�}t����������j��������|�������������D�]\��}}||vrd||<����|S�)z:Return dict where keys are lines in the line number table.r���)�dis�findlinestarts)�code�strs�linenosr����r����s��� r����_find_lines_from_coder����H��s?�������G��'��-�-�� �� � ��6������G�F�O���Nr���c�����������������������t����������|�|������������}|�j��������D�]9}t����������j��������|������������r#|���������������������t����������||��������������������������:|S�)z<Return lineno dict for all code objects reachable from code.)r����� co_consts�inspect�iscoderN����_find_lines)r����r����r�����cs��� r���r����r����R��sZ�������$�D�$�/�/�G���^��1��1���>�!���� 1��N�N�;�q�$�/�/�0�0�0���Nr���c������������������L����i�}t�����������j��������}t����������|�|�������������5�}t����������j��������|j��������������������}|D�]O\��}}}} } |t�����������j��������k����r5|t�����������j��������k����r%|\��}}| \��} }t����������|| dz���������������D�]}d||<����|}�P �ddd�������������n#�1�swxY�w�Y���|S�)z�Return a dict of possible docstring positions. The dict maps line numbers to strings. There is an entry for line that contains only a string or a part of a triple-quoted string. r����r���N)�token�INDENTrK���rr����generate_tokensrt����STRING�range)r!���r����r���� prev_ttyperU����tok�ttype�tstr�start�endr�����sline�scol�eline�ecol�is��� r���� _find_stringsr����^��s ������ �A����J� �h�� *� *� *�� �a��&�q�z�2�2��-0�� �� �)�E�4���T����$�$����-�-�"'�K�E�4�"%�K�E�4�"�5�%�!�)�4�4��!��!�� ��!����J�J� � �� �� �� �� �� �� �� �� �� �� ����� �� �� �� �� �Hs����A,B�B� Bc������������������j���� �t����������j��������|�������������5�}|�����������������������������������}|j��������}ddd�������������n#�1�swxY�w�Y���n:#�t����������$�r-}t����������d|��d|��t����������j����������������������i�cY�d}~S�d}~ww�xY�wt����������||�d������������}t����������|�|������������}t����������||������������S�)zAReturn dict where keys are line numbers in the line number table.NzNot printing coverage data for rB���rC����exec)rr���rK����readr����rP���rS���r3���rT����compiler����r����)r!���rU����progr����rV���r����r����s��� r���rn���rn���u��s������ �]�8� $� $�� "���6�6�8�8�D��z�H� "�� "�� "�� "�� "�� "�� "�� "�� "�� "�� "����� "�� "�� "�� "����������� ��!)���3�3�0�7:�z� C�� C�� C�� C�� � � � � � �����������4��6�*�*�D���8�,�,�D��t�T�"�"�"s=����A ��>�A ��A�A ��A�A �� B�"A<�6B�<Bc��������������������`�����e�Zd�Z � � �dd�Zd��Zdd�Zd ��Zd ��Zd��Zd��Z d ��Z d��Zd��Zd��Z d��ZdS�)r���r���r���r ���NFc �����������������������||�_���������||�_��������t����������||������������|�_��������i�|�_��������i�|�_��������d|�_��������||�_��������i�|�_��������i�|�_ ��������i�|�_ ��������d|�_��������| rt������������������������|�_��������|r|�j ��������|�_��������dS�|r|�j��������|�_��������dS�|r|r|�j��������|�_��������|�j��������|�_��������dS�|r|�j��������|�_��������|�j��������|�_��������dS�|r|�j��������|�_��������|�j��������|�_��������dS�d|�_��������dS�)ax�� @param count true iff it should count number of times each line is executed @param trace true iff it should print out each line that is being counted @param countfuncs true iff it should just output a list of (filename, modulename, funcname,) for functions that were called at least once; This overrides `count' and `trace' @param ignoremods a list of the names of modules to ignore @param ignoredirs a list of the names of directories to ignore all of the (recursive) contents of @param infile file from which to read stored counts to be added into the results @param outfile file in which to write the results @param timing true iff timing information be displayed r���Nr���)rI���rJ���r����ignorerE����pathtobasename� donothing�trace�_calledfuncs�_callers� _caller_cache� start_time�_time�globaltrace_trackcallers�globaltrace�globaltrace_countfuncs�globaltrace_lt�localtrace_trace_and_count� localtrace�localtrace_trace�localtrace_count) r���r����r����� countfuncs�countcallers� ignoremods� ignoredirsrI���rJ����timings ��� r���r���zTrace.__init__���s�����(��������j�*�5�5������ �������� ������ ��������� &�#�g�g�D�O��� �#�<�D���� �� �#�:�D���� �� �u�� �#�2�D��"�=�D�O�O�O� �� �#�2�D��"�3�D�O�O�O� �� �#�2�D��"�3�D�O�O�O���D�N�N�Nr���c������������������J�����dd�l�}|j��������}|����������������������|||�������������d�S�)Nr���)�__main__�__dict__�runctx)r����cmdr�����dicts��� r����runz Trace.run���s/����������� �����C��t�$�$�$�$�$r���c������������������x����|�i�}|�i�}|�j���������s2t����������j��������|�j���������������������t ����������j��������|�j��������������������� �t����������|||�������������|�j���������s*t ����������j��������d��������������t����������j��������d��������������d�S�d�S�#�|�j���������s)t ����������j��������d��������������t����������j��������d��������������w�w�xY�wr����)r����� threading�settracer����r3���r����)r���r�����globals�localss��� r���r����zTrace.runctx���s��������?�b�G��>�B�6��~�� +���t�/�0�0�0��L��)�*�*�*� )���g�v�&�&�&��>�� )���T�"�"�"��"�4�(�(�(�(�(� )�� )��4�>�� )���T�"�"�"��"�4�(�(�(�(� )���s����B��2B9c�����������������������d�}|�j���������st����������j��������|�j��������������������� ��||i�|��}|�j���������st����������j��������d��������������n!#�|�j���������st����������j��������d��������������w�w�xY�w|S�r����)r����r3���r����r����)r����func�args�kw�results��� r����runfuncz Trace.runfunc���s����������~�� +��L��)�*�*�*� #��T�4�&�2�&�&�F��>�� #���T�"�"�"�����>�� #���T�"�"�"�"� #����� s����A��A&c������������������<����|j���������}|j��������}|rt����������|������������}nd�}|j��������}d�}||�j��������v�r|�j��������|���������� |�j��������|���������}n�d�|�j��������|<���d��t����������j��������|������������D���������������}t����������|������������dk����r�d��t����������j��������|d���������������������D���������������}t����������|������������dk����rNd��t����������j��������|d���������������������D���������������} t����������| ������������dk����r| d���������j��������}||�j��������|<���|�|�d|��}|||fS�)Nc������������������:�����g�|�]}t����������j��������|�������������|��S�r ���)r����� isfunction)r���rU���s��� r���r���z1Trace.file_module_function_of.<locals>.<listcomp>���s7�������3��3��3�1�#�.�q�1�1�3�Q��3��3��3r���r���c������������������<�����g�|�]}t����������|t�����������������������|��S�r ���)� isinstancer����r���s��� r���r���z1Trace.file_module_function_of.<locals>.<listcomp>���s6�������5��5��5�q� *�1�d� 3� 3�5���5��5��5r���r���c������������������2�����g�|�]}t����������|d��������������|��S�)� __bases__)�hasattr)r���r����s��� r���r���z1Trace.file_module_function_of.<locals>.<listcomp>���s6�������?��?��?�Q�&-�a��&=�&=�?�q��?��?��?r���r���) �f_code�co_filenamer/����co_namer�����gc� get_referrersr4���r&���) r����framer����r!���r"���r|����clsname�funcs�dicts�classess ��� r����file_module_function_ofzTrace.file_module_function_of���s_������|���#���� �!�(�+�+�J�J��J��<�����4�%�%�%��!�$�'�3��,�T�2���'+�D��t�$�3��3�� 0�� 6� 6��3��3��3�E� ��5�z�z�Q���5��5�B�$4�U�1�X�$>�$>��5��5��5���u�:�:��?�?�?��?�"�*:�5��8�*D�*D��?��?��?�G��7�|�|�q�(�(�")�!�*�"5�� �4;��*�4�0���")�'�'�8�8�4�H���X�-�-r���c�����������������������|dk����r=|�����������������������|������������}|�����������������������|j��������������������}d|�j��������||f<���dS�dS�)zkHandler for call events. Adds information about who called who to the self._callers dict. �callr���N)r����f_backr����)r���r�����why�arg� this_func�parent_funcs��� r���r����zTrace.globaltrace_trackcallers���sS������ ��&�=�=��4�4�U�;�;�I��6�6�u�|�D�D�K�67�D�M�;� �2�3�3�3� ��=r���c������������������T�����|dk����r!|�����������������������|������������}d|�j��������|<���dS�dS�)zoHandler for call events. Adds (filename, modulename, funcname) to the self._calledfuncs dict. r��r���N)r���r����)r���r����r��r��r��s��� r���r����zTrace.globaltrace_countfuncs��s:������ ��&�=�=��4�4�U�;�;�I�+,�D��i�(�(�(���=r���c����������������������|dk����r�|j���������}|j�����������������������������dd������������}|rZt����������|������������}|�E|�j�����������������������������||������������}|s*|�j��������rt����������d|�d|j�����������������������|�j ��������S�dS�dS�dS�dS�)z�Handler for call events. If the code block being entered is to be ignored, returns `None', else returns self.localtrace. r���__file__Nz --- modulename: rd���) r����� f_globalsr]���r/���r����r$���r����rS���r����r����)r���r����r��r��r����r!���r"���� ignore_its��� r���r����zTrace.globaltrace_lt��s���������&�=�=��<�D���*�*�:�t�<�<�H��� ��&�h�/�/� ��)� $�� 1� 1�(�J� G� G�I�$��/��:��B�!�E�&0�j�j�$�,�,�$@��B��B��B�#��.� �*�)�/��/���t���=r���c����������� �����������|dk����r�|j���������j��������}|j��������}||f}|�j�����������������������������|d������������dz���|�j��������|<���|�j��������r(t ����������dt������������������������|�j��������z ��z��d��������������t����������j ��������� ��������������������|������������}t ����������d||t����������j��������||������������fz��d��������������|�j ��������S�) Nr����r���r����%.2f� �r����� %s(%d): %sr1���)r����r�����f_linenorE���r]���r����rS���r����r���r���r+���ro����getliner����)r���r����r��r��r!���r����rb����bnames��� r���r����z Trace.localtrace_trace_and_count'��s��������&�=�=��|�/�H��^�F��F�"�C�#�{���s�A�6�6��:�D�K������ E��f����$�/� 9�:��D�D�D�D��G�$�$�X�.�.�E��,�%��"+�"3�H�f�"E�"E�"G��G�LN� P�� P�� P�� P���r���c����������� �������2����|dk����r�|j���������j��������}|j��������}|�j��������r(t ����������dt������������������������|�j��������z ��z��d��������������t����������j�����������������������������|������������}t ����������d||t����������j ��������||������������fz��d��������������|�j��������S�)Nr����r��r��r��r��r1���)r����r����r��r����rS���r����r���r���r+���ro���r��r����)r���r����r��r��r!���r����r��s��� r���r����zTrace.localtrace_trace6��s��������&�=�=��|�/�H��^�F���� E��f����$�/� 9�:��D�D�D�D��G�$�$�X�.�.�E��,�%��"+�"3�H�f�"E�"E�"G��G�LN� P�� P�� P�� P���r���c�����������������������|dk����r=|j���������j��������}|j��������}||f}|�j�����������������������������|d������������dz���|�j��������|<���|�j��������S�)Nr����r���r���)r����r����r��rE���r]���r����)r���r����r��r��r!���r����rb���s��� r���r����zTrace.localtrace_countC��sO�������&�=�=��|�/�H��^�F��F�"�C�#�{���s�A�6�6��:�D�K�����r���c������������������\�����t����������|�j��������|�j��������|�j��������|�j��������|�j���������������������S�)N)rI���rJ���rH���rA���)r���rE���rI���rJ���r����r����)r���s��� r����resultsz Trace.resultsK��s1�������t�{�4�;�'+�|�+/�+<�'+�}�6��6��6�� 6r���) r���r���r���r���r ���r ���NNFr%���)r&���r'���r(���r���r����r����r����r���r����r����r����r����r����r����r��r ���r���r���r���r������s���������������DE�DH��0��0��0��0�d%��%��%� )��)��)��)� �� �� �'.��'.��'.�R 8�� 8�� 8�-��-��-������. �� �� �����������6��6��6��6��6r���c�������������������*�������dd�l�}�|������������������������������������}|���������������������ddd��������������|���������������������dd������������}|���������������������dd d d��������������|���������������������d dd d��������������|���������������������ddd d��������������|���������������������ddd d��������������|���������������������d������������}|�����������������������������������}|���������������������ddd d��������������|���������������������ddd d��������������|���������������������ddd� �������������|���������������������d!d"d#� �������������|���������������������d$d%d d&��������������|���������������������d'd(d d)��������������|���������������������d*d+d d,��������������|���������������������d-d.������������}|���������������������d/d0g�d1�2�������������|���������������������d3d0g�d4�2�������������|���������������������d5d d6d7�2�������������|���������������������d8d9d:�;�������������|���������������������d<|�j��������d=�;�������������|�����������������������������������}|j��������r(t����������j ��������d>�������������t����������j ��������d?���������������fd@��dA��|j ��������D���������������|_ ���������fdB�|j��������D���������������|_��������|j��������r]|j��������s|� ��������������������dC�������������t����������|j��������|j���������D������������}|���������������������|j��������|j��������|j��������������������S�t'����������|j��������|j��������|j��������|j��������g������������s|� ��������������������dE�������������|j��������r#|j��������s|j��������r|� ��������������������dF�������������|j��������r|j��������s|� ��������������������dG�������������|j���������|� ��������������������dH�������������t3����������|j��������|j��������|j��������|j��������|j ��������|j��������|j��������|j��������|j���������I� ��� ��������} �|j��������rVdd�l}|j��������}|���������������������|������������\��} } }|j��������g|j���������t@����������_!��������dJ|j��������| j"��������| j#��������| d�dK�}n�|j��������g|j���������t@����������_!��������tH����������j%���������&��������������������|j��������������������t@����������j%��������d<���tO����������j(��������|j��������������������5�} tS����������| �*����������������������������������|j��������dL������������}d�d�d��������������n#�1�swxY�w�Y���|j��������dJd�d�dM�}|�+��������������������|||�������������nL#�tX����������$�r4}tA����������j-��������dNt@����������j!��������d����������dO|���������������Y�d�}~nd�}~wt\����������$�r�Y�nw�xY�w|�/����������������������������������}|j0��������s(|���������������������|j��������|j��������|j���������������������d�S�d�S�)PNr���z --version�versionz trace 2.0)�actionr��zMain optionsz(One of these (or --report) must be givenz-cz--count� store_truez�Count the number of times each line is executed and write the counts to <module>.cover for each module executed, in the module's directory. See also --coverdir, --file, --no-report below.)r���helpz-tz--tracez3Print each line to sys.stdout before it is executedz-lz--listfuncsz�Keep track of which functions are executed at least once and write the results to sys.stdout after the program exits. Cannot be specified alongside --trace or --count.z-Tz--trackcallsz^Keep track of caller/called pairs and write the results to sys.stdout after the program exits.� Modifiersz-rz--reportz�Generate a report from a counts file; does not execute any code. --file must specify the results file to read, which must have been created in a previous run with --count --file=FILEz-Rz--no-reportz^Do not generate the coverage report files. Useful if you want to accumulate over several runs.z-fz--filez+File to accumulate counts over several runs)r��z-Cz --coverdirz�Directory where the report files go. The coverage report for <package>.<module> will be written to file <dir>/<package>/<module>.coverz-mz --missingz?Annotate executable lines that were not executed with ">>>>>> "z-sz --summaryz\Write a brief summary for each file to sys.stdout. Can only be used with --count or --reportz-gz--timingzQPrefix each line with the time since the program started. Only used while tracing�FilterszCan be specified multiple timesz--ignore-module�appendzqIgnore the given module(s) and its submodules (if it is a package). Accepts comma separated list of module names.)r���defaultr��z--ignore-dirzWIgnore files in the given directory (multiple directories can be joined by os.pathsep).z--moduleFzTrace a module. �progname�?zfile to run as main program)�nargsr��� argumentszarguments to the program�stdlib� platstdlibc�����������������������t�����������j�����������������������������t�����������j�����������������������������|�������������������������}�|����������������������d����������������������������������d�������������}�t�����������j�����������������������������|�������������S�)Nz$prefixz$exec_prefix)r���r���� expanduser� expandvarsr6���r ���)�s�_exec_prefix�_prefixs��� ��r����parse_ignore_dirzmain.<locals>.parse_ignore_dir���sa��������G���r�w�1�1�!�4�4�5�5�� �I�I�i��)�)�1�1�.�,�O�O���w����"�"�"r���c������������������f�����g�|�].}|����������������������d�������������D�]}|��������������������������������������/S�)�,)�split�strip)r���r����r#���s��� r���r���zmain.<locals>.<listcomp>���sW�������O��O��O��������O��O�:=���)�)�+�+��O��O��O��Or���c������������������j������g�|�]/}|����������������������t����������j��������������������D�] }��|���������������0S�r ���)r1��r����pathsep)r���r����r+��r.��s��� �r���r���zmain.<locals>.<listcomp>���s_��������N��N��N�������9L�9L�N��N�45��(�'��*�*��N��N��N��Nr���z-r/--report requires -f/--file)rI���rJ���zLmust specify one of --trace, --count, --report, --listfuncs, or --trackcallsz8cannot specify both --listfuncs and (--trace or --count)z3--summary can only be used with --count or --reportz3progname is missing: required with the main options)r����r����r����r����rI���rJ���r����r����)r&���r ���__package__� __loader__�__spec__� __cached__r����)r ��r&���r5��r8��zCannot run file z because: )1�argparse�ArgumentParser�add_argument�add_argument_group�add_mutually_exclusive_group� REMAINDER� parse_args� ignore_dir� sysconfig�get_path� ignore_module�reportrD����errorr���r�����missingry���rz����anyr����r����� listfuncs� trackcallsr"��r���r�����module�runpy�_get_module_detailsr����r%��r3����argv�parent�loaderr���r���rk����io� open_coder����r����r����rP����exit� SystemExitr��� no_report)r9���parser�grp�_grp�optsr���trK���module_name�mod_name�mod_specr�����globsr����rV���r,��r-��r.��s��� @@@r����mainr^��Q��sQ���������O�O�O� � $� $� &� &�F� ����I�{��K�K�K� � #� #�N�6�8��8�C�����T�9�\�&����'��'��'� ����T�9�\�F����H��H��H����T�=��E����F��F��F�����T�>�,�7����8��8��8��� #� #�K� 0� 0�C��+�+�-�-�D����d�J�|����� �� �� � � ���d�M�,�G����H��H��H�����T�8�>����@��@��@����T�<�2����3��3��3�����T�;�|��������������T�;�|�=����>��>��>�����T�:�l�+����,��,��,��� #� #�I�-�/��/�C����&�x��!����"��"��"�����^�H�b�G����H��H��H����� �<��/����1��1��1� ��� �#�.����0��0��0� ����8�+=�+����-��-��-�������D����8��$�X�.�.�� �)�,�7�7��#��#��#��#��#��#� O��O�#'�#5�O��O��O�D��N��N��N��N� $��N��N��N�D�O���{��P��y�� ;��L�L�9�:�:�:�!���D�I�F�F�F���$�$�T�\�4�<���O�O�O��� �D�J�����H�I�I��5�����4�� 5�� 5�� 5���~��Q�4�:��Q����Q����O�P�P�P��|��L�D�J��L����J�K�K�K��}�����J�K�K�K� �d�j�$�*����?�t�7I������i��� 5�� 5�� 5�A� ��;�� ��L�L�L��-�K�',�'@�'@��'M�'M�$�H�h���(�:�4�>�:�C�H�&� �,�'��&�o�$�"� ���E�E��� �7���7�C�H��'�/�/�$�-�8�8�C�H�Q�K���d�m�,�,�� A���r�w�w�y�y�$�-��@�@�� A�� A�� A�� A�� A�� A�� A�� A�� A�� A�� A����� A�� A�� A�� A��!�M�&�#�"� ���E�� ����u�e�$�$�$�$����H��H��H����S�X�a�[�[�[�#�#�F�G�G�G�G�G�G�G�G������� �� �� ��� ������i�i�k�k�G��>��I����d�l�D�L�$�-�H�H�H�H�H�I��IsC���� C�T�� )S� T��S�T��S�&T�� U �*T=�= U �U r����r����)�__doc__�__all__rP��ro���r���r3���rA��r����rr���r����r����r����rL����timer���r����r����r����r���r/���r=���r���r����r����r����rn���r���r^��r&���r ���r���r����<module>rb�����s�����<���(��%� &��� � � � ���������� � � � �� � � � ������������������������� � � � �� � � � �� � � � ��#��#��#��#��#��#���������#��0��0��0��0��0��0��0��0�d����� �� �� �8l��l��l��l��l��l��l��l�\����� �� �� � �� �� �� �.#��#��#�L6��L6��L6��L6��L6��L6��L6��L6�\PI��PI��PI�d��Z����D�F�F�F�F�F���r���