Hacked By AnonymousFox
�
�܋f_� � �� � d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z! ddl"m#Z#m$Z$m%Z% ddl&m'Z'm(Z( ddl)m*Z* ddl+m,Z,m-Z- dd l.m/Z/m0Z0m1Z1 dd
l2m3Z3m4Z4m5Z5m6Z6m7Z7 ddl8m9Z9 e-e � � Z dZ:d
Z; e dedef �� � Z<dd�Z= G d� de$� � Z>dd�Z? G d� de$� � Z@dS )zSQLite coverage data.� )�annotationsN)�cast�Any�Callable�
Collection�Dict�Iterable�Iterator�List�Mapping�Optional�Sequence�Set�Tuple�TypeVar�Union)�NoDebugging�
AutoReprMixin�clipped_repr)�CoverageException� DataError)�PathAliases)�file_be_gone�isolate_module)�numbits_to_nums�
numbits_union�nums_to_numbits)�FilePath�TArc� TDebugCtl�TLineNo�TWarnFn)�__version__� a� CREATE TABLE coverage_schema (
-- One row, to record the version of the schema in this db.
version integer
);
CREATE TABLE meta (
-- Key-value pairs, to record metadata about the data
key text,
value text,
unique (key)
-- Possible keys:
-- 'has_arcs' boolean -- Is this data recording branches?
-- 'sys_argv' text -- The coverage command line that recorded the data.
-- 'version' text -- The version of coverage.py that made the file.
-- 'when' text -- Datetime when the file was created.
);
CREATE TABLE file (
-- A row per file measured.
id integer primary key,
path text,
unique (path)
);
CREATE TABLE context (
-- A row per context measured.
id integer primary key,
context text,
unique (context)
);
CREATE TABLE line_bits (
-- If recording lines, a row per context per file executed.
-- All of the line numbers for that file/context are in one numbits.
file_id integer, -- foreign key to `file`.
context_id integer, -- foreign key to `context`.
numbits blob, -- see the numbits functions in coverage.numbits
foreign key (file_id) references file (id),
foreign key (context_id) references context (id),
unique (file_id, context_id)
);
CREATE TABLE arc (
-- If recording branches, a row per context per from/to line transition executed.
file_id integer, -- foreign key to `file`.
context_id integer, -- foreign key to `context`.
fromno integer, -- line number jumped from.
tono integer, -- line number jumped to.
foreign key (file_id) references file (id),
foreign key (context_id) references context (id),
unique (file_id, context_id, fromno, tono)
);
CREATE TABLE tracer (
-- A row per file indicating the tracer used for that file.
file_id integer primary key,
tracer text,
foreign key (file_id) references file (id)
);
�TMethod.)�bound�method�returnc �H � � t j � � � d� fd�� � }|S ) z4A decorator for methods that should hold self._lock.�self�CoverageData�argsr �kwargsr( c �n �� | j � d� � r*| j � d| j �d�j � �� � | j 5 | j � d� � r*| j � d| j �d�j � �� � �| g|�R i |��cd d d � � S # 1 swxY w Y d S )N�lockzLocking z for zLocked )�_debug�should�write�_lock�__name__)r* r, r- r'