Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
B

ëŠ;s¿™ã@s`dZddlZddlZddlZddlmZddlmZmZddl	m
Z
eeƒZGdd„deƒZdS)z'Source file annotation for coverage.py.éN)Ú
flat_rootname)Ú
ensure_dirÚisolate_module)Úget_analysis_to_reportc@s>eZdZdZdd„Ze d¡Ze d¡Zddd„Z	d	d
„Z
dS)ÚAnnotateReporteraGenerate annotated source files showing line coverage.

    This reporter creates annotated copies of the measured source files. Each
    .py file is copied as a .py,cover file, with a left-hand margin annotating
    each line::

        > def h(x):
        -     if 0:   #pragma: no cover
        -         pass
        >     if x == 1:
        !         a = 1
        >     else:
        >         a = 2

        > h(2)

    Executed lines use '>', lines not executed use '!', lines excluded from
    consideration use '-'.

    cCs||_|jj|_d|_dS)N)ÚcoverageÚconfigÚ	directory)Úselfr©rú/build/wlanpi-profiler-MIf3Xw/wlanpi-profiler-1.0.8/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/coverage/annotate.pyÚ__init__'s
zAnnotateReporter.__init__z\s*(#|$)z\s*else\s*:\s*(#|$)NcCs:||_|j ¡x$t|j|ƒD]\}}| ||¡qWdS)zIRun the report.

        See `coverage.report()` for arguments.

        N)r	rÚget_datarÚ
annotate_file)r
Zmorfsr	ÚfrÚanalysisrrrÚreport/s
zAnnotateReporter.reportc	Cs2t|jƒ}t|jƒ}t|jƒ}|jrjt|jƒtj |jt	| 
¡ƒ¡}| d¡r`|dd…d}|d7}n
|jd}t
j|ddd¢}d	}d	}	d
}
| ¡}x„t| d
¡ddD]l\}}
x$|t|ƒkrà|||krà|d7}q¾Wx(|	t|ƒkr
||	|kr
|	d7}	qäW|t|ƒkrB|||krB|	t|ƒkp@||	|k}
|j |
¡r\| d
¡nº|j |
¡rä|t|ƒkr’|	t|ƒkr’| d¡nP|t|ƒks®|	t|ƒkrº| d¡n(||||	krØ| d¡n
| d¡n2||krú| d¡n|
r| d¡n
| d¡| |
¡q²WWdQRXdS)z]Annotate a single file.

        `fr` is the FileReporter for the file to annotate.

        Z_pyNéýÿÿÿz.pyz,coverÚwÚutf8)ÚencodingrTé)Ústartz  z! z> z- )ÚsortedÚ
statementsÚmissingÚexcludedr	rÚosÚpathÚjoinrZrelative_filenameÚendswithÚfilenameÚioÚopenÚsourceÚ	enumerateÚ
splitlinesÚlenÚblank_reÚmatchÚwriteÚelse_re)r
rrrrrÚ	dest_fileÚdestÚiÚjZcoveredr$ÚlinenoÚlinerrrr:sL






 

zAnnotateReporter.annotate_file)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
ÚreÚcompiler(r+rrrrrrrs


r)
r5r"rr6Zcoverage.filesrZ
coverage.miscrrZcoverage.reportrÚobjectrrrrrÚ<module>s