Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/site-packages/coverage/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/coverage/__pycache__/report.cpython-37.pyc

B

E�W�@sXdZddlZddlZddlmZmZddlmZmZm	Z	m
Z
e
e�ZGdd�de�ZdS)z$Reporter foundation for coverage.py.�N)�
prep_patterns�FnmatchMatcher)�CoverageException�NoSource�	NotPython�isolate_modulec@s6eZdZdZdd�Zedd��Zdd�Zdd	d
�ZdS)�ReporterzA base class for all reporters.cCs||_||_d|_g|_dS)z�Create a reporter.

        `coverage` is the coverage instance. `config` is an instance  of
        CoverageConfig, for controlling all sorts of behavior.

        N)�coverage�config�	directory�_file_reporters)�selfr	r
�r�B/opt/alt/python37/lib64/python3.7/site-packages/coverage/report.py�__init__szReporter.__init__cCst�dt�|jS)z8Keep .file_reporters working for private-grabbing tools.zDReport.file_reporters will no longer be available in Coverage.py 4.2)�warnings�warn�DeprecationWarningr)r
rrr�file_reporters&szReporter.file_reporterscsp|j�|�}|jjr6tt|jj����fdd�|D�}|jjr`tt|jj����fdd�|D�}t|�|_|jS)z�Find the FileReporters we'll report on.

        `morfs` is a list of modules or file names.

        Returns a list of FileReporters.

        csg|]}��|j�r|�qSr)�match�filename)�.0�fr)�matcherrr�
<listcomp>;sz0Reporter.find_file_reporters.<locals>.<listcomp>csg|]}��|j�s|�qSr)rr)rr)rrrr?s)	r	Z_get_file_reportersr
�includerrZomit�sortedr)r
�morfsZ	reportersr)rr�find_file_reporters/s
zReporter.find_file_reportersNc	Cs�|�|�}|std��||_|jr<tj�|j�s<t�|j�x||D]t}y|||j�|��WqBt	k
rz|j
jsv�YqBtk
r�|�
�r�|j
jr�|j�d�|j��n�YqBXqBWdS)a?Run a reporting function on a number of morfs.

        `report_fn` is called for each relative morf in `morfs`.  It is called
        as::

            report_fn(file_reporter, analysis)

        where `file_reporter` is the `FileReporter` for the morf, and
        `analysis` is the `Analysis` for the morf.

        zNo data to report.zCould not parse Python file {0}N)rrr�os�path�exists�makedirsr	Z_analyzerr
�
ignore_errorsrZshould_be_python�_warn�formatr)r
Z	report_fnrrrrrrr�report_filesDs"

zReporter.report_files)N)	�__name__�
__module__�__qualname__�__doc__r�propertyrrr&rrrrrs
	r)
r*rrZcoverage.filesrrZ
coverage.miscrrrr�objectrrrrr�<module>s