Repository URL to install this package:
|
Version:
1.0.11 ▾
|
wlanpi-profiler
/
opt
/
wlanpi-profiler
/
lib
/
python3.7
/
site-packages
/
coverage
/
__pycache__
/
parser.cpython-37.pyc
|
|---|
B
=*´`?kÇã @ sp d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m
Z
ddlmZ ddl
mZmZmZ ddlmZmZmZmZmZ ddlmZmZmZ G d d
d
ZG dd dZG d
d dZG dd deZG dd deZG dd deZ G dd deZ!G dd de "dd¡Z#eddd G dd dZ$d d! Z%G d"d# d#Z&d$gZ'd%d& Z(de)fd'd(Z*dS ))zCode parsing for coverage.py.é N)Úenv)Úcode_objects)Úshort_stack)ÚNoSourceÚ NotPythonÚ_StopEverything)ÚcontractÚ
join_regexÚnew_contractÚ nice_pairÚone_of)Úcompile_unicodeÚgenerate_tokensÚneuter_encoding_declarationc @ s~ e Zd ZdZedddddZdd Zd d
Zdd Zd
d Z dd Z
dd Zdd Zdd Z
dd Zdd ZdddZdS )ÚPythonParserzParse code to find executable lines, excluded lines, etc.
This information is all based on static analysis: no code execution is
involved.
zunicode|None)ÚtextNc
C sÖ |s|st d|pd| _|| _| js~ddlm} y|| j| _W n: tk
r| } ztd| j d| |W dd}~X Y nX || _| j d¡| _ 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.
z*PythonParser needs either text or filenamez<code>r )Úget_python_sourcezNo source for code: 'z': NÚ
F)ÚAssertionErrorÚfilenamer Zcoverage.pythonr ÚOSErrorr ÚexcludeÚsplitÚlinesÚsetÚ
statementsÚexcludedÚraw_statementsÚraw_excludedÚraw_docstringsÚshow_tokensÚ
_multilineÚ _all_arcsÚ_missing_arc_fragments)Úselfr r r r Úerr© r&