Repository URL to install this package:
Version:
1.0.8-1 ▾
|
wlanpi-profiler
/
opt
/
wlanpi-profiler
/
lib
/
python3.7
/
site-packages
/
coverage
/
__pycache__
/
parser.cpython-37.pyc
|
---|
B ÿ¼bIã @ s d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m Z ddl mZmZ ddl mZ ddlmZ ddlmZmZmZmZmZ dd lmZmZmZ dd lmZmZmZ G dd deZG d d deZ G dd deZ!G dd deZ"G dd deZ#G dd de $dd¡Z%eddd e&e'ej( )dd¡Z*G dd deZ+G dd d eZ,e*rd!gZ-d"d# Z.d&d$d%Z/dS )'zCode parsing for coverage.py.é N)Úenv)Úrange)Ú bytes_to_intsÚstring_class)Úcode_objects)Úshort_stack)ÚcontractÚ join_regexÚnew_contractÚ nice_pairÚone_of)ÚNoSourceÚ NotPythonÚStopEverything)Úcompile_unicodeÚgenerate_tokensÚneuter_encoding_declarationc @ s e Zd ZdZedddddZedd Zd d Zdd Z d d Z dd Zdd Zdd Z dd Zdd Zdd Zdd Zd ddZdS )!Ú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| _|| _| jsxddlm} y|| j| _W n4 tk rv } ztd| j|f W dd}~X Y nX || _| j d¡| _ t | _t | _t | _ t | _t | _t | _d| _i | _d| _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: '%s': %sNÚ F)ÚAssertionErrorÚfilenamer Zcoverage.pythonr ÚIOErrorr ÚexcludeÚsplitÚlinesÚsetÚ statementsÚexcludedÚraw_statementsÚraw_excludedÚ raw_classdefsÚraw_docstringsÚshow_tokensÚ _multilineÚ_byte_parserÚ _all_arcsÚ_missing_arc_fragments)Úselfr r r r Úerr© r+ ú/build/wlanpi-profiler-MIf3Xw/wlanpi-profiler-1.0.8/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/coverage/parser.pyÚ__init__ s. "zPythonParser.__init__c C s | j st| j| jd| _ | j S )zCreate a ByteParser on demand.)r )r&