| 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
�ab!C � @ s� d Z ddlZddlZddlZddlmZ ddlmZmZm Z m
Z
mZmZ ddl
mZ ddlmZ ddlmZ ddlZddlmZ dd lmZ dd
lmZ ddlmZmZmZmZmZ ddlm Z dd
l!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z* e�+dej,�Z-dd� e.e��/� D �Z0e1ed�dd�Z2e1e1ed�dd�Z3G dd� de4�Z5G dd� d�Z6G dd � d e�Z7G d!d"� d"e"�Z8e7e1d#�d$d%�Z9e&e7dd&�d'd(�Z:e(e7dd&�d)d*�Z;e*e7dd&�d+d,�Z<ej=e7dd&�d-d.�Z>eee1ef d/�d0d1�Z?dS )2a[
sphinx.ext.inheritance_diagram
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines a docutils directive for inserting inheritance diagrams.
Provide the directive with one or more classes or modules (separated
by whitespace). For modules, all of the classes in that module will
be used.
Example::
Given the following classes:
class A: pass
class B(A): pass
class C(A): pass
class D(B, C): pass
class E(B): pass
.. inheritance-diagram: D E
Produces a graph like the following:
A
/ \
B C
/ \ /
E D
The graph is inserted as a PNG+image map into HTML and a PDF in
LaTeX.
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�
import_module)�Any�Dict�Iterable�List�Tuple�cast)�nodes)�Node)�
directives)�addnodes)�Sphinx)�BuildEnvironment)�figure_wrapper�graphviz�render_dot_html�render_dot_latex�render_dot_texinfo)�md5)�SphinxDirective)�
OptionSpec)�HTMLTranslator)�LaTeXTranslator)�TexinfoTranslatorz�^(?:([\w.]*)\.)? # module names
(\w+) \s* $ # class/final module name
c C s g | ]}t �|�r|�qS � )�inspect�isclass)�.0�objr r �B/usr/lib/python3.9/site-packages/sphinx/ext/inheritance_diagram.py�
<listcomp>B s
�r )�objname�returnc C s� z
t | �W S ty Y dS ty� t�| �}|s>Y dS |�� \}}|du rXY dS zt |�}t||d�W Y S ty� Y Y dS 0 Y n0 dS )z�Import a object or module using *name* and *currentmodule*.
*name* should be a relative name from *currentmodule* or
a fully-qualified name.
Returns imported object or module. If failed, returns None value.
N)r � TypeError�ImportError�
module_sig_re�match�groups�getattr)r! Zmatched�modname�attrname�moduler r r �
try_importF s
r, )�name�
currmoduler"