Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
lib
/
python3
/
dist-packages
/
sphinx
/
ext
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: doctest.cpython-310.pyc
o �$�a$Y � @ s d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m Z mZmZm Z mZmZmZmZmZmZ ddlmZ ddlmZmZmZ ddlmZ dd lmZmZ dd lm Z ddl!Z!ddl"m#Z# ddl$m%Z% dd l&m'Z' ddl(m)Z) ddl*m+Z+ ddl,m-Z- ddl.m/Z/ e r�ddl0m1Z1 e'�2e3�Z4e�5dej6�Z7e�5dej6�Z8de9de9de:fdd�Z;G dd� de+�Z<G dd� de<�Z=G dd� de<�Z>G d d!� d!e<�Z?G d"d#� d#e<�Z@G d$d%� d%e<�ZAe�B� ZCG d&d'� d'�ZDG d(d)� d)�ZEG d*d+� d+ejF�ZGG d,d-� d-e#�ZHd.d/de e9ef fd0d1�ZIdS )2z� sphinx.ext.doctest ~~~~~~~~~~~~~~~~~~ Mimic doctest by automatically executing code snippets and checking their results. :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. � N)�StringIO)�path) � TYPE_CHECKING�Any�Callable�Dict�Iterable�List�Sequence�Set�Tuple�Type)�nodes)�Element�Node�TextElement)� directives)�InvalidSpecifier�SpecifierSet)�Version)�Builder)�__)�logging)�bold)�SphinxDirective)�relpath)� OptionSpec)�Sphinxz^\s*<BLANKLINE>z#\s*doctest:.+$�spec�version�returnc C s t |�t| �v S )aa Check `spec` satisfies `version` or not. This obeys PEP-440 specifiers: https://www.python.org/dev/peps/pep-0440/#version-specifiers Some examples: >>> is_allowed_version('3.3', '<=3.5') True >>> is_allowed_version('3.3', '<=3.2') False >>> is_allowed_version('3.3', '>3.2, <4.0') True )r r )r r � r! �4/usr/lib/python3/dist-packages/sphinx/ext/doctest.py�is_allowed_version. s r# c @ s2 e Zd ZdZdZdZdZdZdee fdd�Z dS ) � TestDirectivez4 Base class for doctest-related directives. Tr � r c C s� d� | j�}d }| jdkr-d|v r|}t�d|�}t�|�r-d| jvr-|s'|}t�d|�}tj }| jdv s:d| jv r=tj }| jrNdd � | jd �d�D �}ndg}|||| j|d �}| � |� |d urg||d<