File: //usr/lib/python3/dist-packages/sphinx/ext/autosummary/__pycache__/__init__.cpython-310.pyc
o
o�ax � @ sD d Z ddlZddlZddlZddlZddlZddlZddlmZ ddlmZ ddl m
Z
ddlmZm
Z
mZmZmZmZmZ ddlmZ ddlmZmZmZ dd lmZ dd
lmZmZmZ ddlm Z ddl!Z!ddl!m"Z" dd
l#m$Z$ ddl%m&Z& ddl'm(Z(m)Z)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0m1Z1 ddl2m3Z3m4Z4 ddl5m6Z6 ddl7m8Z8 ddl9m:Z: ddl;m<Z< ddl=m>Z>m?Z? ddl@mAZA ddlBmCZCmDZD ddlEmFZFmGZGmHZHmIZImJZJ ddlKmLZL ddlMmNZN ddlOmPZP ddlQmRZR eC�SeT�ZUe�Vd �ZWe�Vd!�ZXd"ZYG d#d$� d$ejZ�Z[d%e$d&ej\d'dfd(d)�Z]d*ej^d+e[d'dfd,d-�Z_d*ej^d+ed'dfd.d/�Z`G d0d1� d1ejZ�Zad*eRd+ead'dfd2d3�Zbe*d4d5die)i � G d6d7� d7�ZcG d8d9� d9e3�Zdd%e$d:ed;ed'ee1 fd<d=�ZeG d>d?� d?eG�Zfd@egd'egfdAdB�Zhd@egd'egfdCdD�ZidgdFegdGejd'egfdHdI�ZkdJeeg dKed'egfdLdM�Zl E NdhdOegdPeeg dGejdQegd'egf
dRdS�ZmdTe,d'eeg fdUdV�ZndgfdWegdXeeg d'eegeeegf fdYdZ�ZodWegd'eeeegf fd[d\�ZpdgfdWegdXeeg d'eegeeegf fd]d^�ZqG d_d`� d`eH�Zrd%e$d'egfdadb�Zsd%e$d'dfdcdd�Ztd%e$d'e
egef fdedf�ZudS )ia�
sphinx.ext.autosummary
~~~~~~~~~~~~~~~~~~~~~~
Sphinx extension that adds an autosummary:: directive, which can be
used to generate function/method/attribute/etc. summary lists, similar
to those output eg. by Epydoc and other API doc generation tools.
An :autolink: role is also provided.
autosummary directive
---------------------
The autosummary directive has the form::
.. autosummary::
:nosignatures:
:toctree: generated/
module.function_1
module.function_2
...
and it generates an output table (containing signatures, optionally)
======================== =============================================
module.function_1(args) Summary line from the docstring of function_1
module.function_2(args) Summary line from the docstring
...
======================== =============================================
If the :toctree: option is specified, files matching the function names
are inserted to the toctree with the given prefix:
generated/module.function_1
generated/module.function_2
...
Note: The file names contain the module:: or currentmodule:: prefixes.
.. seealso:: autosummary_generate.py
autolink role
-------------
The autolink role functions as ``:obj:`` when the name referred can be
resolved to a Python object, and otherwise it becomes simple emphasis.
This can be used as the default role to make links 'smart'.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)� Parameter)�path)�
ModuleType)�Any�Dict�List�Optional�Tuple�Type�cast)�nodes)�Element�Node�system_message)�
directives)�RSTStateMachine�Struct�
state_classes)�
StringList)�addnodes)�Sphinx)�Config)�RemovedInSphinx50Warning�RemovedInSphinx60Warning�deprecated_alias)�BuildEnvironment)�TocTree)�INSTANCEATTR�
Documenter)�DocumenterBridge�Options)�
import_module)�mock)�__)�Project)�ModuleAnalyzer�PycodeError)�SphinxComponentRegistry)�logging�rst)�NullReporter�SphinxDirective�
SphinxRole�new_document�switch_source_input)�signature_from_str)�Matcher)�
OptionSpec)�HTMLTranslatorz \.(?:\s+)z::\s*$)zet al.z i.e.c @ � e Zd ZdS )�autosummary_tocN��__name__�
__module__�__qualname__� r9 r9 �A/usr/lib/python3/dist-packages/sphinx/ext/autosummary/__init__.pyr4 k � r4 �app�doctree�returnc sH t jdtdd� | jj�i �ddtdtddf� ��fd d
�
� � |� dS )ziInsert items described in autosummary:: to the TOC tree, but do
not generate the toctree:: list.
z'process_autosummary_toc() is deprecated� )�
stacklevel� �node�depthr>