| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/sphinx/ext/__pycache__/ |
Upload File : |
a
�abg7 � @ s d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m
Z
mZmZm
Z
mZmZmZ ddlZddlmZ ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ e�e�Z de
e!e!dd
�dd�Z"e!e!e
e d�dd�Z#G dd� de�Z$eee!ef d�dd�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-2022 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 �7/usr/lib/python3.9/site-packages/sphinx/ext/coverage.py�write_header s r )�name�expsr c C sL g }|D ]>}z|� t�|�� W q tyD t�td�|| � Y q0 q|S )Nzinvalid regex %r in %s)�append�re�compile� Exception�logger�warningr
)r r Zlst�expr r r �compile_regex_list% s r% c @ s� e Zd ZdZdZedej d �Zdd�dd�Z e
d�d d
�Zedd�dd
�Z
dd�dd�Zdd�dd�Ze
ed�dd�Zdd�dd�Zdd�dd�Zdd�dd�ZdS )�CoverageBuilderz:
Evaluates coverage of code in the documentation.
ZcoveragezNTesting of coverage in the sources finished, look at the results in %(outdir)szpython.txt.N)r c C s� g | _ | jjD ]$}t�| j|�}| j �t�|�� qg | _| jj �
� D ]F\}}z| j�|t�
|�f� W qF ty� t�td�|� Y qF0 qFi | _| jj�
� D ]\}}td|�| j|<