File: //usr/lib/python3/dist-packages/sphinx/ext/__pycache__/coverage.cpython-310.pyc
o
�$�ag7 � @ s d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m
Z
mZmZm
Z
mZmZmZ ddlZddlmZ ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ e�e�Z dd
e
de!de!ddfdd�Z"de!de!de
e fdd�Z#G dd� de�Z$dedee!ef fdd�Z%dS )a-
sphinx.ext.coverage
~~~~~~~~~~~~~~~~~~~
Check Python modules and C API for coverage. Mostly written by Josip
Dzolonga for the Google Highly Open Participation contest.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�
import_module)�path)�IO�Any�Dict�List�Pattern�Set�Tuple)�Sphinx)�Builder)�__)�logging)�red)�safe_getattr�-�f�text�char�returnc C s( | � |d � | � |t|� d � d S )N�
)�write�len)r r r � r �5/usr/lib/python3/dist-packages/sphinx/ext/coverage.py�write_header s r �name�expsc C sJ g }|D ]}z
|� t�|�� W q ty" t�td�|| � Y qw |S )Nzinvalid regex %r in %s)�append�re�compile� Exception�logger�warningr
)r r �lst�expr r r �compile_regex_list% s �r&