diff options
285 files changed, 446 insertions, 2724 deletions
@@ -1,6 +1,9 @@ License for Sphinx ================== +Unless otherwise indicated, all code in the Sphinx project is licenced under the +two clause BSD licence below. + Copyright (c) 2007-2022 by the Sphinx team (see AUTHORS file). All rights reserved. @@ -35,12 +35,6 @@ import-order-style = smarkets per-file-ignores = tests/*: E501 -[flake8:local-plugins] -extension = - X101 = utils.checks:sphinx_has_header -paths = - . - [isort] line_length = 95 diff --git a/sphinx/__init__.py b/sphinx/__init__.py index 8106e63bf..6a2bcb25b 100644 --- a/sphinx/__init__.py +++ b/sphinx/__init__.py @@ -1,12 +1,4 @@ -""" - Sphinx - ~~~~~~ - - The Sphinx documentation toolchain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The Sphinx documentation toolchain.""" # Keep this file executable as-is in Python 3! # (Otherwise getting the version out of it from setup.py is impossible.) diff --git a/sphinx/__main__.py b/sphinx/__main__.py index daff05441..887bb6ae1 100644 --- a/sphinx/__main__.py +++ b/sphinx/__main__.py @@ -1,12 +1,4 @@ -""" - sphinx.__main__ - ~~~~~~~~~~~~~~~ - - The Sphinx documentation toolchain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The Sphinx documentation toolchain.""" import sys diff --git a/sphinx/addnodes.py b/sphinx/addnodes.py index af1c8fff2..bf74bd1aa 100644 --- a/sphinx/addnodes.py +++ b/sphinx/addnodes.py @@ -1,12 +1,4 @@ -""" - sphinx.addnodes - ~~~~~~~~~~~~~~~ - - Additional docutils nodes. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Additional docutils nodes.""" from typing import TYPE_CHECKING, Any, Dict, List, Sequence diff --git a/sphinx/application.py b/sphinx/application.py index fd8b65b6e..53bcc552a 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -1,13 +1,6 @@ -""" - sphinx.application - ~~~~~~~~~~~~~~~~~~ - - Sphinx application class and extensibility interface. - - Gracefully adapted from the TextPress system by Armin. +"""Sphinx application class and extensibility interface. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Gracefully adapted from the TextPress system by Armin. """ import os diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py index b61cd026d..e1817c445 100644 --- a/sphinx/builders/__init__.py +++ b/sphinx/builders/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.builders - ~~~~~~~~~~~~~~~ - - Builder superclass for all builders. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Builder superclass for all builders.""" import pickle import time diff --git a/sphinx/builders/_epub_base.py b/sphinx/builders/_epub_base.py index 3b1891769..26efdc1fb 100644 --- a/sphinx/builders/_epub_base.py +++ b/sphinx/builders/_epub_base.py @@ -1,12 +1,4 @@ -""" - sphinx.builders._epub_base - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Base class of epub2/epub3 builders. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Base class of epub2/epub3 builders.""" import html import os diff --git a/sphinx/builders/changes.py b/sphinx/builders/changes.py index a80e53d9a..3a1f5bd65 100644 --- a/sphinx/builders/changes.py +++ b/sphinx/builders/changes.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.changes - ~~~~~~~~~~~~~~~~~~~~~~~ - - Changelog builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Changelog builder.""" import html from os import path diff --git a/sphinx/builders/dirhtml.py b/sphinx/builders/dirhtml.py index 82af09be1..bf8af15bb 100644 --- a/sphinx/builders/dirhtml.py +++ b/sphinx/builders/dirhtml.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.dirhtml - ~~~~~~~~~~~~~~~~~~~~~~~ - - Directory HTML builders. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Directory HTML builders.""" from os import path from typing import Any, Dict diff --git a/sphinx/builders/dummy.py b/sphinx/builders/dummy.py index cddf8e7b8..f4f1356f6 100644 --- a/sphinx/builders/dummy.py +++ b/sphinx/builders/dummy.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.dummy - ~~~~~~~~~~~~~~~~~~~~~ - - Do syntax checks, but no writing. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Do syntax checks, but no writing.""" from typing import Any, Dict, Set diff --git a/sphinx/builders/epub3.py b/sphinx/builders/epub3.py index b1a3f520e..013955ed1 100644 --- a/sphinx/builders/epub3.py +++ b/sphinx/builders/epub3.py @@ -1,12 +1,6 @@ -""" - sphinx.builders.epub3 - ~~~~~~~~~~~~~~~~~~~~~ - - Build epub3 files. - Originally derived from epub.py. +"""Build epub3 files. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Originally derived from epub.py. """ import html diff --git a/sphinx/builders/gettext.py b/sphinx/builders/gettext.py index f9dac2891..e8bc547b7 100644 --- a/sphinx/builders/gettext.py +++ b/sphinx/builders/gettext.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.gettext - ~~~~~~~~~~~~~~~~~~~~~~~ - - The MessageCatalogBuilder class. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The MessageCatalogBuilder class.""" from codecs import open from collections import OrderedDict, defaultdict diff --git a/sphinx/builders/html/__init__.py b/sphinx/builders/html/__init__.py index 9f9c17b3d..bbd3b91e0 100644 --- a/sphinx/builders/html/__init__.py +++ b/sphinx/builders/html/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.html - ~~~~~~~~~~~~~~~~~~~~ - - Several HTML builders. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Several HTML builders.""" import html import os diff --git a/sphinx/builders/html/transforms.py b/sphinx/builders/html/transforms.py index ea1d69d12..ea596cb4b 100644 --- a/sphinx/builders/html/transforms.py +++ b/sphinx/builders/html/transforms.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.html.transforms - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Transforms for HTML builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Transforms for HTML builder.""" import re from typing import Any, Dict, List diff --git a/sphinx/builders/latex/__init__.py b/sphinx/builders/latex/__init__.py index d7156b796..fb33007f1 100644 --- a/sphinx/builders/latex/__init__.py +++ b/sphinx/builders/latex/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.latex - ~~~~~~~~~~~~~~~~~~~~~ - - LaTeX builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""LaTeX builder.""" import os import warnings diff --git a/sphinx/builders/latex/constants.py b/sphinx/builders/latex/constants.py index 25caf1736..ace608644 100644 --- a/sphinx/builders/latex/constants.py +++ b/sphinx/builders/latex/constants.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.latex.constants - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - consntants for LaTeX builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""consntants for LaTeX builder.""" from typing import Any, Dict diff --git a/sphinx/builders/latex/nodes.py b/sphinx/builders/latex/nodes.py index 95b5211f5..2c008b9a7 100644 --- a/sphinx/builders/latex/nodes.py +++ b/sphinx/builders/latex/nodes.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.latex.nodes - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Additional nodes for LaTeX writer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Additional nodes for LaTeX writer.""" from docutils import nodes diff --git a/sphinx/builders/latex/theming.py b/sphinx/builders/latex/theming.py index b2e3a4dff..69f849381 100644 --- a/sphinx/builders/latex/theming.py +++ b/sphinx/builders/latex/theming.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.latex.theming - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Theming support for LaTeX builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Theming support for LaTeX builder.""" import configparser from os import path diff --git a/sphinx/builders/latex/transforms.py b/sphinx/builders/latex/transforms.py index 621c6a7cf..5e478f5c4 100644 --- a/sphinx/builders/latex/transforms.py +++ b/sphinx/builders/latex/transforms.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.latex.transforms - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Transforms for LaTeX builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Transforms for LaTeX builder.""" from typing import Any, Dict, List, Set, Tuple, cast diff --git a/sphinx/builders/latex/util.py b/sphinx/builders/latex/util.py index 6b797c9a2..6883829c5 100644 --- a/sphinx/builders/latex/util.py +++ b/sphinx/builders/latex/util.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.latex.util - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Utilities for LaTeX builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Utilities for LaTeX builder.""" from typing import Optional diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py index 4f760b8bc..a94572484 100644 --- a/sphinx/builders/linkcheck.py +++ b/sphinx/builders/linkcheck.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.linkcheck - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - The CheckExternalLinksBuilder class. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The CheckExternalLinksBuilder class.""" import json import re diff --git a/sphinx/builders/manpage.py b/sphinx/builders/manpage.py index c942cfa86..43637b65a 100644 --- a/sphinx/builders/manpage.py +++ b/sphinx/builders/manpage.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.manpage - ~~~~~~~~~~~~~~~~~~~~~~~ - - Manual pages builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Manual pages builder.""" from os import path from typing import Any, Dict, List, Set, Tuple, Union diff --git a/sphinx/builders/singlehtml.py b/sphinx/builders/singlehtml.py index 09db8d2b9..d177474a6 100644 --- a/sphinx/builders/singlehtml.py +++ b/sphinx/builders/singlehtml.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.singlehtml - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Single HTML builders. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Single HTML builders.""" from os import path from typing import Any, Dict, List, Tuple, Union diff --git a/sphinx/builders/texinfo.py b/sphinx/builders/texinfo.py index f07cd2516..24a19b0df 100644 --- a/sphinx/builders/texinfo.py +++ b/sphinx/builders/texinfo.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.texinfo - ~~~~~~~~~~~~~~~~~~~~~~~ - - Texinfo builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Texinfo builder.""" import os from os import path diff --git a/sphinx/builders/text.py b/sphinx/builders/text.py index 6363e11a0..bcd479864 100644 --- a/sphinx/builders/text.py +++ b/sphinx/builders/text.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.text - ~~~~~~~~~~~~~~~~~~~~ - - Plain-text Sphinx builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Plain-text Sphinx builder.""" from os import path from typing import Any, Dict, Iterator, Set, Tuple diff --git a/sphinx/builders/xml.py b/sphinx/builders/xml.py index c4e066089..0f45b912c 100644 --- a/sphinx/builders/xml.py +++ b/sphinx/builders/xml.py @@ -1,12 +1,4 @@ -""" - sphinx.builders.xml - ~~~~~~~~~~~~~~~~~~~ - - Docutils-native XML and pseudo-XML builders. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Docutils-native XML and pseudo-XML builders.""" from os import path from typing import Any, Dict, Iterator, Set, Type, Union diff --git a/sphinx/cmd/__init__.py b/sphinx/cmd/__init__.py index d77014547..4d277c5ea 100644 --- a/sphinx/cmd/__init__.py +++ b/sphinx/cmd/__init__.py @@ -1,9 +1 @@ -""" - sphinx.cmd - ~~~~~~~~~~ - - Modules for command line executables. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Modules for command line executables.""" diff --git a/sphinx/cmd/build.py b/sphinx/cmd/build.py index 8de24a364..00a06762a 100644 --- a/sphinx/cmd/build.py +++ b/sphinx/cmd/build.py @@ -1,12 +1,4 @@ -""" - sphinx.cmd.build - ~~~~~~~~~~~~~~~~ - - Build documentation from a provided source. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Build documentation from a provided source.""" import argparse import bdb diff --git a/sphinx/cmd/make_mode.py b/sphinx/cmd/make_mode.py index cad0eeabb..b8f3d33e1 100644 --- a/sphinx/cmd/make_mode.py +++ b/sphinx/cmd/make_mode.py @@ -1,17 +1,10 @@ -""" - sphinx.cmd.make_mode - ~~~~~~~~~~~~~~~~~~~~ - - sphinx-build -M command-line handling. - - This replaces the old, platform-dependent and once-generated content - of Makefile / make.bat. +"""sphinx-build -M command-line handling. - This is in its own module so that importing it is fast. It should not - import the main Sphinx modules (like sphinx.applications, sphinx.builders). +This replaces the old, platform-dependent and once-generated content +of Makefile / make.bat. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +This is in its own module so that importing it is fast. It should not +import the main Sphinx modules (like sphinx.applications, sphinx.builders). """ import os diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py index 01e7e3b16..e8b446d40 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -1,12 +1,4 @@ -""" - sphinx.cmd.quickstart - ~~~~~~~~~~~~~~~~~~~~~ - - Quickly setup documentation source to work with Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Quickly setup documentation source to work with Sphinx.""" import argparse import locale diff --git a/sphinx/config.py b/sphinx/config.py index 37ca06e1d..50de07b72 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -1,12 +1,4 @@ -""" - sphinx.config - ~~~~~~~~~~~~~ - - Build configuration file handling. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Build configuration file handling.""" import re import traceback diff --git a/sphinx/deprecation.py b/sphinx/deprecation.py index 5b95f8b99..5661c535d 100644 --- a/sphinx/deprecation.py +++ b/sphinx/deprecation.py @@ -1,12 +1,4 @@ -""" - sphinx.deprecation - ~~~~~~~~~~~~~~~~~~ - - Sphinx deprecation classes and utilities. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Sphinx deprecation classes and utilities.""" import sys import warnings diff --git a/sphinx/directives/__init__.py b/sphinx/directives/__init__.py index 90658a904..0e5cc0c60 100644 --- a/sphinx/directives/__init__.py +++ b/sphinx/directives/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.directives - ~~~~~~~~~~~~~~~~~ - - Handlers for additional ReST directives. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Handlers for additional ReST directives.""" import re from typing import TYPE_CHECKING, Any, Dict, Generic, List, Tuple, TypeVar, cast diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index ddd47e1f8..dc44ed314 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -1,11 +1,3 @@ -""" - sphinx.directives.code - ~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - import sys import textwrap from difflib import unified_diff diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index a14b6e801..83cbb6707 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -1,11 +1,3 @@ -""" - sphinx.directives.other - ~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - import re from typing import TYPE_CHECKING, Any, Dict, List, cast diff --git a/sphinx/directives/patches.py b/sphinx/directives/patches.py index d76bb74c7..a01d78332 100644 --- a/sphinx/directives/patches.py +++ b/sphinx/directives/patches.py @@ -1,11 +1,3 @@ -""" - sphinx.directives.patches - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - import os import warnings from os import path diff --git a/sphinx/domains/__init__.py b/sphinx/domains/__init__.py index 4252baf65..f422b8b74 100644 --- a/sphinx/domains/__init__.py +++ b/sphinx/domains/__init__.py @@ -1,12 +1,7 @@ -""" - sphinx.domains - ~~~~~~~~~~~~~~ - - Support for domains, which are groupings of description directives - and roles describing e.g. constructs of one programming language. +"""Support for domains. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Domains are groupings of description directives +and roles describing e.g. constructs of one programming language. """ import copy diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py index 5181afb17..176a1def1 100644 --- a/sphinx/domains/c.py +++ b/sphinx/domains/c.py @@ -1,12 +1,4 @@ -""" - sphinx.domains.c - ~~~~~~~~~~~~~~~~ - - The C language domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The C language domain.""" import re from typing import (Any, Callable, Dict, Generator, Iterator, List, Optional, Tuple, TypeVar, diff --git a/sphinx/domains/changeset.py b/sphinx/domains/changeset.py index 9db598975..31fa44020 100644 --- a/sphinx/domains/changeset.py +++ b/sphinx/domains/changeset.py @@ -1,12 +1,4 @@ -""" - sphinx.domains.changeset - ~~~~~~~~~~~~~~~~~~~~~~~~ - - The changeset domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The changeset domain.""" from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, cast diff --git a/sphinx/domains/citation.py b/sphinx/domains/citation.py index f98abc4d1..39e63b659 100644 --- a/sphinx/domains/citation.py +++ b/sphinx/domains/citation.py @@ -1,12 +1,4 @@ -""" - sphinx.domains.citation - ~~~~~~~~~~~~~~~~~~~~~~~ - - The citation domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The citation domain.""" from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, cast diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 311885e5d..64985a37f 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -1,12 +1,4 @@ -""" - sphinx.domains.cpp - ~~~~~~~~~~~~~~~~~~ - - The C++ language domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The C++ language domain.""" import re from typing import (Any, Callable, Dict, Generator, Iterator, List, Optional, Tuple, TypeVar, diff --git a/sphinx/domains/index.py b/sphinx/domains/index.py index 7dbc1bb5a..8c630c8f5 100644 --- a/sphinx/domains/index.py +++ b/sphinx/domains/index.py @@ -1,12 +1,4 @@ -""" - sphinx.domains.index - ~~~~~~~~~~~~~~~~~~~~ - - The index domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The index domain.""" from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Tuple diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py index 2095d1d10..ab16cdd85 100644 --- a/sphinx/domains/javascript.py +++ b/sphinx/domains/javascript.py @@ -1,12 +1,4 @@ -""" - sphinx.domains.javascript - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - The JavaScript domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The JavaScript domain.""" from typing import Any, Dict, Iterator, List, Optional, Tuple, cast diff --git a/sphinx/domains/math.py b/sphinx/domains/math.py index 7f66a4738..6df7d30cb 100644 --- a/sphinx/domains/math.py +++ b/sphinx/domains/math.py @@ -1,12 +1,4 @@ -""" - sphinx.domains.math - ~~~~~~~~~~~~~~~~~~~ - - The math domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The math domain.""" from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Tuple diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 145b62eda..f55d76ba0 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -1,12 +1,4 @@ -""" - sphinx.domains.python - ~~~~~~~~~~~~~~~~~~~~~ - - The Python domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The Python domain.""" import builtins import inspect diff --git a/sphinx/domains/rst.py b/sphinx/domains/rst.py index 0899e02f8..f861ecad1 100644 --- a/sphinx/domains/rst.py +++ b/sphinx/domains/rst.py @@ -1,12 +1,4 @@ -""" - sphinx.domains.rst - ~~~~~~~~~~~~~~~~~~ - - The reStructuredText domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The reStructuredText domain.""" import re from typing import Any, Dict, Iterator, List, Optional, Tuple, cast diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py index e9f75325a..11a3260b7 100644 --- a/sphinx/domains/std.py +++ b/sphinx/domains/std.py @@ -1,12 +1,4 @@ -""" - sphinx.domains.std - ~~~~~~~~~~~~~~~~~~ - - The standard domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The standard domain.""" import re import warnings diff --git a/sphinx/environment/__init__.py b/sphinx/environment/__init__.py index 9dde7b407..b5b135241 100644 --- a/sphinx/environment/__init__.py +++ b/sphinx/environment/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.environment - ~~~~~~~~~~~~~~~~~~ - - Global creation environment. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Global creation environment.""" import os import pickle diff --git a/sphinx/environment/adapters/__init__.py b/sphinx/environment/adapters/__init__.py index 168bd6ba6..1566aecba 100644 --- a/sphinx/environment/adapters/__init__.py +++ b/sphinx/environment/adapters/__init__.py @@ -1,9 +1 @@ -""" - sphinx.environment.adapters - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Sphinx environment adapters - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Sphinx environment adapters""" diff --git a/sphinx/environment/adapters/asset.py b/sphinx/environment/adapters/asset.py index af5f79e96..57fdc91f1 100644 --- a/sphinx/environment/adapters/asset.py +++ b/sphinx/environment/adapters/asset.py @@ -1,12 +1,4 @@ -""" - sphinx.environment.adapters.asset - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Assets adapter for sphinx.environment. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Assets adapter for sphinx.environment.""" from sphinx.environment import BuildEnvironment diff --git a/sphinx/environment/adapters/indexentries.py b/sphinx/environment/adapters/indexentries.py index d13c24042..49881b76d 100644 --- a/sphinx/environment/adapters/indexentries.py +++ b/sphinx/environment/adapters/indexentries.py @@ -1,12 +1,4 @@ -""" - sphinx.environment.adapters.indexentries - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Index entries adapters for sphinx.environment. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Index entries adapters for sphinx.environment.""" import re import unicodedata diff --git a/sphinx/environment/adapters/toctree.py b/sphinx/environment/adapters/toctree.py index 962e73143..631060e75 100644 --- a/sphinx/environment/adapters/toctree.py +++ b/sphinx/environment/adapters/toctree.py @@ -1,12 +1,4 @@ -""" - sphinx.environment.adapters.toctree - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Toctree adapter for sphinx.environment. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Toctree adapter for sphinx.environment.""" from typing import TYPE_CHECKING, Any, Iterable, List, Optional, cast diff --git a/sphinx/environment/collectors/__init__.py b/sphinx/environment/collectors/__init__.py index ba7c20636..6f12c1323 100644 --- a/sphinx/environment/collectors/__init__.py +++ b/sphinx/environment/collectors/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.environment.collectors - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - The data collector components for sphinx.environment. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The data collector components for sphinx.environment.""" from typing import TYPE_CHECKING, Dict, List, Optional, Set diff --git a/sphinx/environment/collectors/asset.py b/sphinx/environment/collectors/asset.py index 9530b3bd9..6bb922c66 100644 --- a/sphinx/environment/collectors/asset.py +++ b/sphinx/environment/collectors/asset.py @@ -1,12 +1,4 @@ -""" - sphinx.environment.collectors.asset - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - The image collector for sphinx.environment. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The image collector for sphinx.environment.""" import os from glob import glob diff --git a/sphinx/environment/collectors/dependencies.py b/sphinx/environment/collectors/dependencies.py index 4138c4c15..87f7c29f2 100644 --- a/sphinx/environment/collectors/dependencies.py +++ b/sphinx/environment/collectors/dependencies.py @@ -1,12 +1,4 @@ -""" - sphinx.environment.collectors.dependencies - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - The dependencies collector components for sphinx.environment. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The dependencies collector components for sphinx.environment.""" import os from os import path diff --git a/sphinx/environment/collectors/metadata.py b/sphinx/environment/collectors/metadata.py index 3165b0389..c70a5d408 100644 --- a/sphinx/environment/collectors/metadata.py +++ b/sphinx/environment/collectors/metadata.py @@ -1,12 +1,4 @@ -""" - sphinx.environment.collectors.metadata - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - The metadata collector components for sphinx.environment. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The metadata collector components for sphinx.environment.""" from typing import Any, Dict, List, Set, cast diff --git a/sphinx/environment/collectors/title.py b/sphinx/environment/collectors/title.py index 8c285f323..10c5560fd 100644 --- a/sphinx/environment/collectors/title.py +++ b/sphinx/environment/collectors/title.py @@ -1,12 +1,4 @@ -""" - sphinx.environment.collectors.title - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - The title collector components for sphinx.environment. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The title collector components for sphinx.environment.""" from typing import Any, Dict, Set diff --git a/sphinx/environment/collectors/toctree.py b/sphinx/environment/collectors/toctree.py index ddc7a0417..75c981f3c 100644 --- a/sphinx/environment/collectors/toctree.py +++ b/sphinx/environment/collectors/toctree.py @@ -1,12 +1,4 @@ -""" - sphinx.environment.collectors.toctree - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Toctree collector for sphinx.environment. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Toctree collector for sphinx.environment.""" from typing import Any, Dict, List, Set, Tuple, Type, TypeVar, cast diff --git a/sphinx/errors.py b/sphinx/errors.py index c90dd10d0..a0263c613 100644 --- a/sphinx/errors.py +++ b/sphinx/errors.py @@ -1,13 +1,4 @@ -""" - sphinx.errors - ~~~~~~~~~~~~~ - - Contains SphinxError and a few subclasses (in an extra module to avoid - circular import problems). - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Contains SphinxError and a few subclasses.""" from typing import Any diff --git a/sphinx/events.py b/sphinx/events.py index 46cea6827..5302cd005 100644 --- a/sphinx/events.py +++ b/sphinx/events.py @@ -1,13 +1,6 @@ -""" - sphinx.events - ~~~~~~~~~~~~~ - - Sphinx core events. - - Gracefully adapted from the TextPress system by Armin. +"""Sphinx core events. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Gracefully adapted from the TextPress system by Armin. """ from collections import defaultdict diff --git a/sphinx/ext/__init__.py b/sphinx/ext/__init__.py index 803691ca3..16170d4cf 100644 --- a/sphinx/ext/__init__.py +++ b/sphinx/ext/__init__.py @@ -1,9 +1 @@ -""" - sphinx.ext - ~~~~~~~~~~ - - Contains Sphinx features not activated by default. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Contains Sphinx features not activated by default.""" diff --git a/sphinx/ext/apidoc.py b/sphinx/ext/apidoc.py index 07339d6e6..68afc83b8 100644 --- a/sphinx/ext/apidoc.py +++ b/sphinx/ext/apidoc.py @@ -1,17 +1,12 @@ -""" - sphinx.ext.apidoc - ~~~~~~~~~~~~~~~~~ - - Parses a directory tree looking for Python modules and packages and creates - ReST files appropriately to create code documentation with Sphinx. It also - creates a modules index (named modules.<suffix>). +"""Creates reST files corresponding to Python modules for code documentation. - This is derived from the "sphinx-autopackage" script, which is: - Copyright 2008 Société des arts technologiques (SAT), - https://sat.qc.ca/ +Parses a directory tree looking for Python modules and packages and creates +ReST files appropriately to create code documentation with Sphinx. It also +creates a modules index (named modules.<suffix>). - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +This is derived from the "sphinx-autopackage" script, which is: +Copyright 2008 Société des arts technologiques (SAT), +https://sat.qc.ca/ """ import argparse diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py index a6d36f61f..9bea15866 100644 --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -1,13 +1,8 @@ -""" - sphinx.ext.autodoc - ~~~~~~~~~~~~~~~~~~ - - Automatically insert docstrings for functions, classes or whole modules into - the doctree, thus avoiding duplication between docstrings and documentation - for those who like elaborate docstrings. +"""Extension to create automatic documentation from code docstrings. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Automatically insert docstrings for functions, classes or whole modules into +the doctree, thus avoiding duplication between docstrings and documentation +for those who like elaborate docstrings. """ import re diff --git a/sphinx/ext/autodoc/deprecated.py b/sphinx/ext/autodoc/deprecated.py index 22c9f46b6..7eede8eeb 100644 --- a/sphinx/ext/autodoc/deprecated.py +++ b/sphinx/ext/autodoc/deprecated.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.autodoc.deprecated - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - The deprecated Documenters for autodoc. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The deprecated Documenters for autodoc.""" import warnings from typing import Any diff --git a/sphinx/ext/autodoc/directive.py b/sphinx/ext/autodoc/directive.py index 0c040e1ef..2eb25536d 100644 --- a/sphinx/ext/autodoc/directive.py +++ b/sphinx/ext/autodoc/directive.py @@ -1,11 +1,3 @@ -""" - sphinx.ext.autodoc.directive - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - import warnings from typing import Any, Callable, Dict, List, Set, Type diff --git a/sphinx/ext/autodoc/importer.py b/sphinx/ext/autodoc/importer.py index b1bf28ec8..9d5902d2f 100644 --- a/sphinx/ext/autodoc/importer.py +++ b/sphinx/ext/autodoc/importer.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.autodoc.importer - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Importer utilities for autodoc - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Importer utilities for autodoc""" import importlib import traceback diff --git a/sphinx/ext/autodoc/mock.py b/sphinx/ext/autodoc/mock.py index 7bd0b1ea0..f9e14a0cd 100644 --- a/sphinx/ext/autodoc/mock.py +++ b/sphinx/ext/autodoc/mock.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.autodoc.mock - ~~~~~~~~~~~~~~~~~~~~~~~ - - mock for autodoc - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""mock for autodoc""" import contextlib import os diff --git a/sphinx/ext/autodoc/preserve_defaults.py b/sphinx/ext/autodoc/preserve_defaults.py index 8ce16b37a..313fe5501 100644 --- a/sphinx/ext/autodoc/preserve_defaults.py +++ b/sphinx/ext/autodoc/preserve_defaults.py @@ -1,12 +1,7 @@ -""" - sphinx.ext.autodoc.preserve_defaults - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Preserve the default argument values of function signatures in source code - and keep them not evaluated for readability. +"""Preserve function defaults. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Preserve the default argument values of function signatures in source code +and keep them not evaluated for readability. """ import ast diff --git a/sphinx/ext/autodoc/type_comment.py b/sphinx/ext/autodoc/type_comment.py index 95ba6f6b7..9881ae747 100644 --- a/sphinx/ext/autodoc/type_comment.py +++ b/sphinx/ext/autodoc/type_comment.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.autodoc.type_comment - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Update annotations info of living objects using type_comments. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Update annotations info of living objects using type_comments.""" from inspect import Parameter, Signature, getsource from typing import Any, Dict, List, cast diff --git a/sphinx/ext/autodoc/typehints.py b/sphinx/ext/autodoc/typehints.py index 6acd99e46..2b5ceb4a6 100644 --- a/sphinx/ext/autodoc/typehints.py +++ b/sphinx/ext/autodoc/typehints.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.autodoc.typehints - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Generating content for autodoc using typehints - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Generating content for autodoc using typehints""" import re from collections import OrderedDict diff --git a/sphinx/ext/autosectionlabel.py b/sphinx/ext/autosectionlabel.py index e8efcb076..ff2f695ec 100644 --- a/sphinx/ext/autosectionlabel.py +++ b/sphinx/ext/autosectionlabel.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.autosectionlabel - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Allow reference sections by :ref: role using its title. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Allow reference sections by :ref: role using its title.""" from typing import Any, Dict, cast diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py index 74804df4a..e610afc5c 100644 --- a/sphinx/ext/autosummary/__init__.py +++ b/sphinx/ext/autosummary/__init__.py @@ -1,55 +1,49 @@ -""" - 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. +"""Extension that adds an autosummary:: directive. - An :autolink: role is also provided. +The directive can be used to generate function/method/attribute/etc. summary +lists, similar to those output eg. by Epydoc and other API doc generation tools. - autosummary directive - --------------------- +An :autolink: role is also provided. - The autosummary directive has the form:: +autosummary directive +--------------------- - .. autosummary:: - :nosignatures: - :toctree: generated/ +The autosummary directive has the form:: - module.function_1 - module.function_2 - ... + .. autosummary:: + :nosignatures: + :toctree: generated/ - and it generates an output table (containing signatures, optionally) + module.function_1 + module.function_2 + ... - ======================== ============================================= - module.function_1(args) Summary line from the docstring of function_1 - module.function_2(args) Summary line from the docstring - ... - ======================== ============================================= +and it generates an output table (containing signatures, optionally) - If the :toctree: option is specified, files matching the function names - are inserted to the toctree with the given prefix: + ======================== ============================================= + module.function_1(args) Summary line from the docstring of function_1 + module.function_2(args) Summary line from the docstring + ... + ======================== ============================================= - generated/module.function_1 - generated/module.function_2 - ... +If the :toctree: option is specified, files matching the function names +are inserted to the toctree with the given prefix: - Note: The file names contain the module:: or currentmodule:: prefixes. + generated/module.function_1 + generated/module.function_2 + ... - .. seealso:: autosummary_generate.py +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'. +autolink role +------------- - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +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'. """ import inspect diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py index 236865630..798c91e4c 100644 --- a/sphinx/ext/autosummary/generate.py +++ b/sphinx/ext/autosummary/generate.py @@ -1,20 +1,15 @@ -""" - sphinx.ext.autosummary.generate - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Usable as a library or script to generate automatic RST source files for - items referred to in autosummary:: directives. +"""Generates reST source files for autosummary. - Each generated RST file contains a single auto*:: directive which - extracts the docstring of the referred item. +Usable as a library or script to generate automatic RST source files for +items referred to in autosummary:: directives. - Example Makefile rule:: +Each generated RST file contains a single auto*:: directive which +extracts the docstring of the referred item. - generate: - sphinx-autogen -o source/generated source/*.rst +Example Makefile rule:: - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. + generate: + sphinx-autogen -o source/generated source/*.rst """ import argparse diff --git a/sphinx/ext/coverage.py b/sphinx/ext/coverage.py index 2a7e08f8b..3ebd095c2 100644 --- a/sphinx/ext/coverage.py +++ b/sphinx/ext/coverage.py @@ -1,12 +1,7 @@ -""" - sphinx.ext.coverage - ~~~~~~~~~~~~~~~~~~~ - - Check Python modules and C API for coverage. Mostly written by Josip - Dzolonga for the Google Highly Open Participation contest. +"""Check Python modules and C API for coverage. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Mostly written by Josip Dzolonga for the Google Highly Open Participation +contest. """ import glob diff --git a/sphinx/ext/doctest.py b/sphinx/ext/doctest.py index 490516d63..0c02547e9 100644 --- a/sphinx/ext/doctest.py +++ b/sphinx/ext/doctest.py @@ -1,12 +1,6 @@ -""" - sphinx.ext.doctest - ~~~~~~~~~~~~~~~~~~ - - Mimic doctest by automatically executing code snippets and checking - their results. +"""Mimic doctest in Sphinx. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +The extension automatically execute code snippets and checks their results. """ import doctest diff --git a/sphinx/ext/duration.py b/sphinx/ext/duration.py index b65703472..94fd9077a 100644 --- a/sphinx/ext/duration.py +++ b/sphinx/ext/duration.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.duration - ~~~~~~~~~~~~~~~~~~~ - - Measure durations of Sphinx processing. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Measure durations of Sphinx processing.""" from datetime import datetime, timedelta from itertools import islice diff --git a/sphinx/ext/extlinks.py b/sphinx/ext/extlinks.py index 8caba8842..4b476ec0a 100644 --- a/sphinx/ext/extlinks.py +++ b/sphinx/ext/extlinks.py @@ -1,28 +1,20 @@ -""" - sphinx.ext.extlinks - ~~~~~~~~~~~~~~~~~~~ - - Extension to save typing and prevent hard-coding of base URLs in the reST - files. - - This adds a new config value called ``extlinks`` that is created like this:: +"""Extension to save typing and prevent hard-coding of base URLs in reST files. - extlinks = {'exmpl': ('https://example.invalid/%s.html', caption), ...} +This adds a new config value called ``extlinks`` that is created like this:: - Now you can use e.g. :exmpl:`foo` in your documents. This will create a - link to ``https://example.invalid/foo.html``. The link caption depends on - the *caption* value given: + extlinks = {'exmpl': ('https://example.invalid/%s.html', caption), ...} - - If it is ``None``, the caption will be the full URL. - - If it is a string, it must contain ``%s`` exactly once. In this case the - caption will be *caption* with the role content substituted for ``%s``. +Now you can use e.g. :exmpl:`foo` in your documents. This will create a +link to ``https://example.invalid/foo.html``. The link caption depends on +the *caption* value given: - You can also give an explicit caption, e.g. :exmpl:`Foo <foo>`. +- If it is ``None``, the caption will be the full URL. +- If it is a string, it must contain ``%s`` exactly once. In this case the + caption will be *caption* with the role content substituted for ``%s``. - Both, the url string and the caption string must escape ``%`` as ``%%``. +You can also give an explicit caption, e.g. :exmpl:`Foo <foo>`. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Both, the url string and the caption string must escape ``%`` as ``%%``. """ import re diff --git a/sphinx/ext/githubpages.py b/sphinx/ext/githubpages.py index 0ea25ba52..e250fb2f2 100644 --- a/sphinx/ext/githubpages.py +++ b/sphinx/ext/githubpages.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.githubpages - ~~~~~~~~~~~~~~~~~~~~~~ - - To publish HTML docs at GitHub Pages, create .nojekyll file. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""To publish HTML docs at GitHub Pages, create .nojekyll file.""" import os import urllib diff --git a/sphinx/ext/graphviz.py b/sphinx/ext/graphviz.py index ad248993d..b4a69a0f2 100644 --- a/sphinx/ext/graphviz.py +++ b/sphinx/ext/graphviz.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.graphviz - ~~~~~~~~~~~~~~~~~~~ - - Allow graphviz-formatted graphs to be included in Sphinx-generated - documents inline. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +"""Allow graphviz-formatted graphs to be included inline in generated documents. """ import posixpath diff --git a/sphinx/ext/ifconfig.py b/sphinx/ext/ifconfig.py index 50a2b203f..bffaa49ff 100644 --- a/sphinx/ext/ifconfig.py +++ b/sphinx/ext/ifconfig.py @@ -1,22 +1,17 @@ -""" - sphinx.ext.ifconfig - ~~~~~~~~~~~~~~~~~~~ - - Provides the ``ifconfig`` directive that allows to write documentation - that is included depending on configuration variables. +"""Provides the ``ifconfig`` directive. - Usage:: +The ``ifconfig`` directive enables writing documentation +that is included depending on configuration variables. - .. ifconfig:: releaselevel in ('alpha', 'beta', 'rc') +Usage:: - This stuff is only included in the built docs for unstable versions. + .. ifconfig:: releaselevel in ('alpha', 'beta', 'rc') - The argument for ``ifconfig`` is a plain Python expression, evaluated in the - namespace of the project configuration (that is, all variables from - ``conf.py`` are available.) + This stuff is only included in the built docs for unstable versions. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +The argument for ``ifconfig`` is a plain Python expression, evaluated in the +namespace of the project configuration (that is, all variables from +``conf.py`` are available.) """ from typing import Any, Dict, List diff --git a/sphinx/ext/imgconverter.py b/sphinx/ext/imgconverter.py index 5a1653037..a40b6c46a 100644 --- a/sphinx/ext/imgconverter.py +++ b/sphinx/ext/imgconverter.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.imgconverter - ~~~~~~~~~~~~~~~~~~~~~~~ - - Image converter extension for Sphinx - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Image converter extension for Sphinx""" import subprocess import sys diff --git a/sphinx/ext/imgmath.py b/sphinx/ext/imgmath.py index 189bf8786..2c908daab 100644 --- a/sphinx/ext/imgmath.py +++ b/sphinx/ext/imgmath.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.imgmath - ~~~~~~~~~~~~~~~~~~ - - Render math in HTML via dvipng or dvisvgm. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Render math in HTML via dvipng or dvisvgm.""" import posixpath import re diff --git a/sphinx/ext/inheritance_diagram.py b/sphinx/ext/inheritance_diagram.py index cf4626c0b..c8a3dc763 100644 --- a/sphinx/ext/inheritance_diagram.py +++ b/sphinx/ext/inheritance_diagram.py @@ -1,38 +1,31 @@ -r""" - sphinx.ext.inheritance_diagram - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +r"""Defines a docutils directive for inserting inheritance diagrams. - 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. - 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:: - Example:: + Given the following classes: - Given the following classes: + class A: pass + class B(A): pass + class C(A): pass + class D(B, C): pass + class E(B): pass - class A: pass - class B(A): pass - class C(A): pass - class D(B, C): pass - class E(B): pass + .. inheritance-diagram: D E - .. inheritance-diagram: D E + Produces a graph like the following: - Produces a graph like the following: + A + / \ + B C + / \ / + E D - 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. +The graph is inserted as a PNG+image map into HTML and a PDF in +LaTeX. """ import builtins diff --git a/sphinx/ext/intersphinx.py b/sphinx/ext/intersphinx.py index 2f8ab2588..64e296c39 100644 --- a/sphinx/ext/intersphinx.py +++ b/sphinx/ext/intersphinx.py @@ -1,26 +1,19 @@ -""" - sphinx.ext.intersphinx - ~~~~~~~~~~~~~~~~~~~~~~ - - Insert links to objects documented in remote Sphinx documentation. - - This works as follows: +"""Insert links to objects documented in remote Sphinx documentation. - * Each Sphinx HTML build creates a file named "objects.inv" that contains a - mapping from object names to URIs relative to the HTML set's root. +This works as follows: - * Projects using the Intersphinx extension can specify links to such mapping - files in the `intersphinx_mapping` config value. The mapping will then be - used to resolve otherwise missing references to objects into links to the - other documentation. +* Each Sphinx HTML build creates a file named "objects.inv" that contains a + mapping from object names to URIs relative to the HTML set's root. - * By default, the mapping file is assumed to be at the same location as the - rest of the documentation; however, the location of the mapping file can - also be specified individually, e.g. if the docs should be buildable - without Internet access. +* Projects using the Intersphinx extension can specify links to such mapping + files in the `intersphinx_mapping` config value. The mapping will then be + used to resolve otherwise missing references to objects into links to the + other documentation. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +* By default, the mapping file is assumed to be at the same location as the + rest of the documentation; however, the location of the mapping file can + also be specified individually, e.g. if the docs should be buildable + without Internet access. """ import concurrent.futures diff --git a/sphinx/ext/linkcode.py b/sphinx/ext/linkcode.py index 6ae828408..ad7abd31b 100644 --- a/sphinx/ext/linkcode.py +++ b/sphinx/ext/linkcode.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.linkcode - ~~~~~~~~~~~~~~~~~~~ - - Add external links to module code in Python object descriptions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Add external links to module code in Python object descriptions.""" from typing import Any, Dict, Set diff --git a/sphinx/ext/mathjax.py b/sphinx/ext/mathjax.py index 7b85799ec..d0d360e2e 100644 --- a/sphinx/ext/mathjax.py +++ b/sphinx/ext/mathjax.py @@ -1,13 +1,8 @@ -""" - sphinx.ext.mathjax - ~~~~~~~~~~~~~~~~~~ +"""Allow `MathJax`_ to be used to display math in Sphinx's HTML writer. - Allow `MathJax <https://www.mathjax.org/>`_ to be used to display math in - Sphinx's HTML writer -- requires the MathJax JavaScript library on your - webserver/computer. +This requires the MathJax JavaScript library on your webserver/computer. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +.. _MathJax: https://www.mathjax.org/ """ import json diff --git a/sphinx/ext/napoleon/__init__.py b/sphinx/ext/napoleon/__init__.py index 7f86b1745..d0dfaf825 100644 --- a/sphinx/ext/napoleon/__init__.py +++ b/sphinx/ext/napoleon/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.napoleon - ~~~~~~~~~~~~~~~~~~~ - - Support for NumPy and Google style docstrings. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Support for NumPy and Google style docstrings.""" from typing import Any, Dict, List diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index 9b9834cfa..a11424537 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -1,14 +1,4 @@ -""" - sphinx.ext.napoleon.docstring - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - - Classes for docstring parsing and formatting. - - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Classes for docstring parsing and formatting.""" import collections import inspect diff --git a/sphinx/ext/napoleon/iterators.py b/sphinx/ext/napoleon/iterators.py index f4d4c2423..9459ad4a6 100644 --- a/sphinx/ext/napoleon/iterators.py +++ b/sphinx/ext/napoleon/iterators.py @@ -1,14 +1,4 @@ -""" - sphinx.ext.napoleon.iterators - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - - A collection of helpful iterators. - - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""A collection of helpful iterators.""" import collections from typing import Any, Iterable, Optional diff --git a/sphinx/ext/todo.py b/sphinx/ext/todo.py index 3b8ba1924..c0d034087 100644 --- a/sphinx/ext/todo.py +++ b/sphinx/ext/todo.py @@ -1,14 +1,8 @@ -""" - sphinx.ext.todo - ~~~~~~~~~~~~~~~ - - Allow todos to be inserted into your documentation. Inclusion of todos can - be switched of by a configuration variable. The todolist directive collects - all todos of your project and lists them along with a backlink to the - original location. +"""Allow todos to be inserted into your documentation. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Inclusion of todos can be switched of by a configuration variable. +The todolist directive collects all todos of your project and lists them along +with a backlink to the original location. """ from typing import Any, Dict, List, Tuple, cast diff --git a/sphinx/ext/viewcode.py b/sphinx/ext/viewcode.py index 54274ac04..5aff7c67d 100644 --- a/sphinx/ext/viewcode.py +++ b/sphinx/ext/viewcode.py @@ -1,12 +1,4 @@ -""" - sphinx.ext.viewcode - ~~~~~~~~~~~~~~~~~~~ - - Add links to module code in Python object descriptions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Add links to module code in Python object descriptions.""" import posixpath import traceback diff --git a/sphinx/extension.py b/sphinx/extension.py index 890a5d8a7..356b4ab9d 100644 --- a/sphinx/extension.py +++ b/sphinx/extension.py @@ -1,12 +1,4 @@ -""" - sphinx.extension - ~~~~~~~~~~~~~~~~ - - Utilities for Sphinx extensions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Utilities for Sphinx extensions.""" from typing import TYPE_CHECKING, Any, Dict diff --git a/sphinx/highlighting.py b/sphinx/highlighting.py index 200f41b33..a7e5e4940 100644 --- a/sphinx/highlighting.py +++ b/sphinx/highlighting.py @@ -1,12 +1,4 @@ -""" - sphinx.highlighting - ~~~~~~~~~~~~~~~~~~~ - - Highlight code blocks using Pygments. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Highlight code blocks using Pygments.""" from functools import partial from importlib import import_module diff --git a/sphinx/io.py b/sphinx/io.py index b52ce094f..936631d51 100644 --- a/sphinx/io.py +++ b/sphinx/io.py @@ -1,12 +1,4 @@ -""" - sphinx.io - ~~~~~~~~~ - - Input/Output files - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Input/Output files""" import codecs from typing import TYPE_CHECKING, Any, List, Type diff --git a/sphinx/jinja2glue.py b/sphinx/jinja2glue.py index 525a4a994..a0d1f65ea 100644 --- a/sphinx/jinja2glue.py +++ b/sphinx/jinja2glue.py @@ -1,12 +1,4 @@ -""" - sphinx.jinja2glue - ~~~~~~~~~~~~~~~~~ - - Glue code for the jinja2 templating engine. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Glue code for the jinja2 templating engine.""" from os import path from pprint import pformat diff --git a/sphinx/locale/__init__.py b/sphinx/locale/__init__.py index 5378da0a3..b9bdff0f9 100644 --- a/sphinx/locale/__init__.py +++ b/sphinx/locale/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.locale - ~~~~~~~~~~~~~ - - Locale utilities. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Locale utilities.""" import gettext import locale diff --git a/sphinx/parsers.py b/sphinx/parsers.py index 3204c0a1b..b044f983b 100644 --- a/sphinx/parsers.py +++ b/sphinx/parsers.py @@ -1,12 +1,4 @@ -""" - sphinx.parsers - ~~~~~~~~~~~~~~ - - A Base class for additional parsers. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""A Base class for additional parsers.""" import warnings from typing import TYPE_CHECKING, Any, Dict, List, Type, Union diff --git a/sphinx/project.py b/sphinx/project.py index 156a08578..134055866 100644 --- a/sphinx/project.py +++ b/sphinx/project.py @@ -1,12 +1,4 @@ -""" - sphinx.project - ~~~~~~~~~~~~~~ - - Utility function and classes for Sphinx projects. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Utility function and classes for Sphinx projects.""" import os from glob import glob diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py index 681bfa38b..5f386d62f 100644 --- a/sphinx/pycode/__init__.py +++ b/sphinx/pycode/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.pycode - ~~~~~~~~~~~~~ - - Utilities parsing and analyzing Python code. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Utilities parsing and analyzing Python code.""" import re import tokenize diff --git a/sphinx/pycode/ast.py b/sphinx/pycode/ast.py index 9e1d23ccc..755116475 100644 --- a/sphinx/pycode/ast.py +++ b/sphinx/pycode/ast.py @@ -1,12 +1,4 @@ -""" - sphinx.pycode.ast - ~~~~~~~~~~~~~~~~~ - - Helpers for AST (Abstract Syntax Tree). - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Helpers for AST (Abstract Syntax Tree).""" import sys from typing import Dict, List, Optional, Type, overload diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py index 5034fe9d5..ff1135c25 100644 --- a/sphinx/pycode/parser.py +++ b/sphinx/pycode/parser.py @@ -1,12 +1,4 @@ -""" - sphinx.pycode.parser - ~~~~~~~~~~~~~~~~~~~~ - - Utilities parsing and analyzing Python code. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Utilities parsing and analyzing Python code.""" import inspect import itertools import re diff --git a/sphinx/pygments_styles.py b/sphinx/pygments_styles.py index d81aa2879..ffc7f7f0b 100644 --- a/sphinx/pygments_styles.py +++ b/sphinx/pygments_styles.py @@ -1,12 +1,4 @@ -""" - sphinx.pygments_styles - ~~~~~~~~~~~~~~~~~~~~~~ - - Sphinx theme specific highlighting styles. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Sphinx theme specific highlighting styles.""" from pygments.style import Style from pygments.styles.friendly import FriendlyStyle diff --git a/sphinx/registry.py b/sphinx/registry.py index 76c30b905..0f8010956 100644 --- a/sphinx/registry.py +++ b/sphinx/registry.py @@ -1,12 +1,4 @@ -""" - sphinx.registry - ~~~~~~~~~~~~~~~ - - Sphinx component registry. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Sphinx component registry.""" import traceback import warnings diff --git a/sphinx/roles.py b/sphinx/roles.py index 09cfac9c7..5e467937b 100644 --- a/sphinx/roles.py +++ b/sphinx/roles.py @@ -1,12 +1,4 @@ -""" - sphinx.roles - ~~~~~~~~~~~~ - - Handlers for additional ReST roles. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Handlers for additional ReST roles.""" import re from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py index 28f3ea036..5fa35ae16 100644 --- a/sphinx/search/__init__.py +++ b/sphinx/search/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.search - ~~~~~~~~~~~~~ - - Create a full-text search index for offline search. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Create a full-text search index for offline search.""" import html import pickle import re diff --git a/sphinx/search/da.py b/sphinx/search/da.py index 6ef91b86f..42559ad93 100644 --- a/sphinx/search/da.py +++ b/sphinx/search/da.py @@ -1,12 +1,4 @@ -""" - sphinx.search.da - ~~~~~~~~~~~~~~~~ - - Danish search language: includes the JS Danish stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Danish search language: includes the JS Danish stemmer.""" from typing import Dict diff --git a/sphinx/search/de.py b/sphinx/search/de.py index 58ea6942c..3896629de 100644 --- a/sphinx/search/de.py +++ b/sphinx/search/de.py @@ -1,12 +1,4 @@ -""" - sphinx.search.de - ~~~~~~~~~~~~~~~~ - - German search language: includes the JS German stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""German search language: includes the JS German stemmer.""" from typing import Dict diff --git a/sphinx/search/en.py b/sphinx/search/en.py index 81ff1ae80..53cd917dc 100644 --- a/sphinx/search/en.py +++ b/sphinx/search/en.py @@ -1,12 +1,4 @@ -""" - sphinx.search.en - ~~~~~~~~~~~~~~~~ - - English search language: includes the JS porter stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""English search language: includes the JS porter stemmer.""" from typing import Dict diff --git a/sphinx/search/es.py b/sphinx/search/es.py index 137a09063..7aba54bfd 100644 --- a/sphinx/search/es.py +++ b/sphinx/search/es.py @@ -1,12 +1,4 @@ -""" - sphinx.search.es - ~~~~~~~~~~~~~~~~ - - Spanish search language: includes the JS Spanish stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Spanish search language: includes the JS Spanish stemmer.""" from typing import Dict diff --git a/sphinx/search/fi.py b/sphinx/search/fi.py index 313ddd158..36f7e7747 100644 --- a/sphinx/search/fi.py +++ b/sphinx/search/fi.py @@ -1,12 +1,4 @@ -""" - sphinx.search.fi - ~~~~~~~~~~~~~~~~ - - Finnish search language: includes the JS Finnish stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Finnish search language: includes the JS Finnish stemmer.""" from typing import Dict diff --git a/sphinx/search/fr.py b/sphinx/search/fr.py index eea1fb507..a469bc922 100644 --- a/sphinx/search/fr.py +++ b/sphinx/search/fr.py @@ -1,12 +1,4 @@ -""" - sphinx.search.fr - ~~~~~~~~~~~~~~~~ - - French search language: includes the JS French stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""French search language: includes the JS French stemmer.""" from typing import Dict diff --git a/sphinx/search/hu.py b/sphinx/search/hu.py index 365439d92..23f7d85bb 100644 --- a/sphinx/search/hu.py +++ b/sphinx/search/hu.py @@ -1,12 +1,4 @@ -""" - sphinx.search.hu - ~~~~~~~~~~~~~~~~ - - Hungarian search language: includes the JS Hungarian stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Hungarian search language: includes the JS Hungarian stemmer.""" from typing import Dict diff --git a/sphinx/search/it.py b/sphinx/search/it.py index da042820f..80b3b3a6d 100644 --- a/sphinx/search/it.py +++ b/sphinx/search/it.py @@ -1,12 +1,4 @@ -""" - sphinx.search.it - ~~~~~~~~~~~~~~~~ - - Italian search language: includes the JS Italian stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Italian search language: includes the JS Italian stemmer.""" from typing import Dict diff --git a/sphinx/search/ja.py b/sphinx/search/ja.py index 1d5ebb605..38520edc3 100644 --- a/sphinx/search/ja.py +++ b/sphinx/search/ja.py @@ -1,12 +1,4 @@ -""" - sphinx.search.ja - ~~~~~~~~~~~~~~~~ - - Japanese search language: includes routine to split words. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Japanese search language: includes routine to split words.""" # Python Version of TinySegmenter # (http://chasen.org/~taku/software/TinySegmenter/) diff --git a/sphinx/search/jssplitter.py b/sphinx/search/jssplitter.py index 4403347ed..babdb8e47 100644 --- a/sphinx/search/jssplitter.py +++ b/sphinx/search/jssplitter.py @@ -1,13 +1,6 @@ -""" - sphinx.search.jssplitter - ~~~~~~~~~~~~~~~~~~~~~~~~ - - Provides Python compatible word splitter to JavaScript - - DO NOT EDIT. This is generated by utils/jssplitter_generator.py +"""Provides Python compatible word splitter to JavaScript - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +DO NOT EDIT. This is generated by utils/jssplitter_generator.py """ splitter_code = """ diff --git a/sphinx/search/nl.py b/sphinx/search/nl.py index 744c7f5d8..b5c549f66 100644 --- a/sphinx/search/nl.py +++ b/sphinx/search/nl.py @@ -1,12 +1,4 @@ -""" - sphinx.search.nl - ~~~~~~~~~~~~~~~~ - - Dutch search language: includes the JS porter stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Dutch search language: includes the JS porter stemmer.""" from typing import Dict diff --git a/sphinx/search/no.py b/sphinx/search/no.py index bff65537f..f11f3cf15 100644 --- a/sphinx/search/no.py +++ b/sphinx/search/no.py @@ -1,12 +1,4 @@ -""" - sphinx.search.no - ~~~~~~~~~~~~~~~~ - - Norwegian search language: includes the JS Norwegian stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Norwegian search language: includes the JS Norwegian stemmer.""" from typing import Dict diff --git a/sphinx/search/pt.py b/sphinx/search/pt.py index 41c2e6004..1708928b2 100644 --- a/sphinx/search/pt.py +++ b/sphinx/search/pt.py @@ -1,12 +1,4 @@ -""" - sphinx.search.pt - ~~~~~~~~~~~~~~~~ - - Portuguese search language: includes the JS Portuguese stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Portuguese search language: includes the JS Portuguese stemmer.""" from typing import Dict diff --git a/sphinx/search/ro.py b/sphinx/search/ro.py index 3736142d2..4c8a22711 100644 --- a/sphinx/search/ro.py +++ b/sphinx/search/ro.py @@ -1,12 +1,4 @@ -""" - sphinx.search.ro - ~~~~~~~~~~~~~~~~ - - Romanian search language: includes the JS Romanian stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Romanian search language: includes the JS Romanian stemmer.""" from typing import Dict, Set diff --git a/sphinx/search/ru.py b/sphinx/search/ru.py index b3c2990be..6c4f8da94 100644 --- a/sphinx/search/ru.py +++ b/sphinx/search/ru.py @@ -1,12 +1,4 @@ -""" - sphinx.search.ru - ~~~~~~~~~~~~~~~~ - - Russian search language: includes the JS Russian stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Russian search language: includes the JS Russian stemmer.""" from typing import Dict diff --git a/sphinx/search/sv.py b/sphinx/search/sv.py index 29d2764ef..176cc8da4 100644 --- a/sphinx/search/sv.py +++ b/sphinx/search/sv.py @@ -1,12 +1,4 @@ -""" - sphinx.search.sv - ~~~~~~~~~~~~~~~~ - - Swedish search language: includes the JS Swedish stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Swedish search language: includes the JS Swedish stemmer.""" from typing import Dict diff --git a/sphinx/search/tr.py b/sphinx/search/tr.py index 86075291c..78d48aed0 100644 --- a/sphinx/search/tr.py +++ b/sphinx/search/tr.py @@ -1,12 +1,4 @@ -""" - sphinx.search.tr - ~~~~~~~~~~~~~~~~ - - Turkish search language: includes the JS Turkish stemmer. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Turkish search language: includes the JS Turkish stemmer.""" from typing import Dict, Set diff --git a/sphinx/search/zh.py b/sphinx/search/zh.py index 0daa4af2a..700c2683f 100644 --- a/sphinx/search/zh.py +++ b/sphinx/search/zh.py @@ -1,12 +1,4 @@ -""" - sphinx.search.zh - ~~~~~~~~~~~~~~~~ - - Chinese search language: includes routine to split words. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Chinese search language: includes routine to split words.""" import os import re diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py index 67b89f1c8..19f2375c8 100644 --- a/sphinx/setup_command.py +++ b/sphinx/setup_command.py @@ -1,14 +1,6 @@ -""" - sphinx.setup_command - ~~~~~~~~~~~~~~~~~~~~ - - Setuptools/distutils commands to assist the building of sphinx - documentation. +"""Setuptools/distutils commands to assist the building of sphinx documentation. - :author: Sebastian Wiesner - :contact: basti.wiesner@gmx.net - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +:author: Sebastian Wiesner <basti.wiesner@gmx.net> """ import os diff --git a/sphinx/testing/__init__.py b/sphinx/testing/__init__.py index c28c0ce0a..1cf074ff1 100644 --- a/sphinx/testing/__init__.py +++ b/sphinx/testing/__init__.py @@ -1,14 +1,7 @@ -""" - sphinx.testing - ~~~~~~~~~~~~~~ - - Sphinx test utilities - - You can require sphinx.testing pytest fixtures in a test module or a conftest - file like this: +"""Sphinx test utilities - pytest_plugins = 'sphinx.testing.fixtures' +You can require sphinx.testing pytest fixtures in a test module or a conftest +file like this: - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. + pytest_plugins = 'sphinx.testing.fixtures' """ diff --git a/sphinx/testing/comparer.py b/sphinx/testing/comparer.py index 395fe1f74..09e8364bd 100644 --- a/sphinx/testing/comparer.py +++ b/sphinx/testing/comparer.py @@ -1,12 +1,4 @@ -""" - sphinx.testing.comparer - ~~~~~~~~~~~~~~~~~~~~~~~ - - Sphinx test comparer for pytest - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Sphinx test comparer for pytest""" import difflib import pathlib from typing import Any, List, Union diff --git a/sphinx/testing/fixtures.py b/sphinx/testing/fixtures.py index 317933ee7..0b558e32c 100644 --- a/sphinx/testing/fixtures.py +++ b/sphinx/testing/fixtures.py @@ -1,12 +1,4 @@ -""" - sphinx.testing.fixtures - ~~~~~~~~~~~~~~~~~~~~~~~ - - Sphinx test fixtures for pytest - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Sphinx test fixtures for pytest""" import subprocess import sys diff --git a/sphinx/testing/path.py b/sphinx/testing/path.py index ef3b5c7d0..404213ecc 100644 --- a/sphinx/testing/path.py +++ b/sphinx/testing/path.py @@ -1,11 +1,3 @@ -""" - sphinx.testing.path - ~~~~~~~~~~~~~~~~~~~ - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - import builtins import os import shutil diff --git a/sphinx/testing/restructuredtext.py b/sphinx/testing/restructuredtext.py index 59dcd37aa..9deabb74a 100644 --- a/sphinx/testing/restructuredtext.py +++ b/sphinx/testing/restructuredtext.py @@ -1,11 +1,3 @@ -""" - sphinx.testing.restructuredtext - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - from os import path from docutils import nodes diff --git a/sphinx/testing/util.py b/sphinx/testing/util.py index d062612cb..441e6da3b 100644 --- a/sphinx/testing/util.py +++ b/sphinx/testing/util.py @@ -1,12 +1,4 @@ -""" - sphinx.testing.util - ~~~~~~~~~~~~~~~~~~~ - - Sphinx test suite utilities - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Sphinx test suite utilities""" import functools import os import re diff --git a/sphinx/theming.py b/sphinx/theming.py index 819cec377..6b8f79c3d 100644 --- a/sphinx/theming.py +++ b/sphinx/theming.py @@ -1,12 +1,4 @@ -""" - sphinx.theming - ~~~~~~~~~~~~~~ - - Theming support for HTML builders. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Theming support for HTML builders.""" import configparser import os diff --git a/sphinx/transforms/__init__.py b/sphinx/transforms/__init__.py index 26e075a7a..a2a592221 100644 --- a/sphinx/transforms/__init__.py +++ b/sphinx/transforms/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.transforms - ~~~~~~~~~~~~~~~~~ - - Docutils transforms used by Sphinx when reading documents. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Docutils transforms used by Sphinx when reading documents.""" import re import unicodedata diff --git a/sphinx/transforms/compact_bullet_list.py b/sphinx/transforms/compact_bullet_list.py index e39ac97d1..4bf633237 100644 --- a/sphinx/transforms/compact_bullet_list.py +++ b/sphinx/transforms/compact_bullet_list.py @@ -1,12 +1,4 @@ -""" - sphinx.transforms.compact_bullet_list - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Docutils transforms used by Sphinx when reading documents. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Docutils transforms used by Sphinx when reading documents.""" from typing import Any, Dict, List, cast diff --git a/sphinx/transforms/i18n.py b/sphinx/transforms/i18n.py index fb2824fe0..4909cebc1 100644 --- a/sphinx/transforms/i18n.py +++ b/sphinx/transforms/i18n.py @@ -1,12 +1,4 @@ -""" - sphinx.transforms.i18n - ~~~~~~~~~~~~~~~~~~~~~~ - - Docutils transforms used by Sphinx when reading documents. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Docutils transforms used by Sphinx when reading documents.""" from os import path from textwrap import indent diff --git a/sphinx/transforms/post_transforms/__init__.py b/sphinx/transforms/post_transforms/__init__.py index df2eeecbb..94a162963 100644 --- a/sphinx/transforms/post_transforms/__init__.py +++ b/sphinx/transforms/post_transforms/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.transforms.post_transforms - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Docutils transforms used by Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Docutils transforms used by Sphinx.""" import re from typing import Any, Dict, List, Optional, Sequence, Tuple, Type, cast diff --git a/sphinx/transforms/post_transforms/code.py b/sphinx/transforms/post_transforms/code.py index 55bd56c2e..3c3f54328 100644 --- a/sphinx/transforms/post_transforms/code.py +++ b/sphinx/transforms/post_transforms/code.py @@ -1,12 +1,4 @@ -""" - sphinx.transforms.post_transforms.code - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - transforms for code-blocks. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""transforms for code-blocks.""" import sys from typing import Any, Dict, List, NamedTuple diff --git a/sphinx/transforms/post_transforms/images.py b/sphinx/transforms/post_transforms/images.py index 1a6d4f6d5..ac9c4225e 100644 --- a/sphinx/transforms/post_transforms/images.py +++ b/sphinx/transforms/post_transforms/images.py @@ -1,12 +1,4 @@ -""" - sphinx.transforms.post_transforms.images - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Docutils transforms used by Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Docutils transforms used by Sphinx.""" import os import re diff --git a/sphinx/transforms/references.py b/sphinx/transforms/references.py index 82e8043bb..647c83e12 100644 --- a/sphinx/transforms/references.py +++ b/sphinx/transforms/references.py @@ -1,12 +1,4 @@ -""" - sphinx.transforms.references - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Docutils transforms used by Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Docutils transforms used by Sphinx.""" from typing import TYPE_CHECKING, Any, Dict diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py index 154bd60c1..ee98c29c8 100644 --- a/sphinx/util/__init__.py +++ b/sphinx/util/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.util - ~~~~~~~~~~~ - - Utility functions for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Utility functions for Sphinx.""" import functools import hashlib diff --git a/sphinx/util/build_phase.py b/sphinx/util/build_phase.py index b8221e5d5..7f80aa576 100644 --- a/sphinx/util/build_phase.py +++ b/sphinx/util/build_phase.py @@ -1,12 +1,4 @@ -""" - sphinx.util.build_phase - ~~~~~~~~~~~~~~~~~~~~~~~ - - Build phase of Sphinx application. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Build phase of Sphinx application.""" from enum import IntEnum diff --git a/sphinx/util/cfamily.py b/sphinx/util/cfamily.py index dd2bde032..e751ae9bb 100644 --- a/sphinx/util/cfamily.py +++ b/sphinx/util/cfamily.py @@ -1,12 +1,4 @@ -""" - sphinx.util.cfamily - ~~~~~~~~~~~~~~~~~~~ - - Utility functions common to the C and C++ domains. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Utility functions common to the C and C++ domains.""" import re from copy import deepcopy diff --git a/sphinx/util/compat.py b/sphinx/util/compat.py index ae481de9b..7f332fda7 100644 --- a/sphinx/util/compat.py +++ b/sphinx/util/compat.py @@ -1,12 +1,4 @@ -""" - sphinx.util.compat - ~~~~~~~~~~~~~~~~~~ - - modules for backward compatibility - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""modules for backward compatibility""" import sys from typing import TYPE_CHECKING, Any, Dict diff --git a/sphinx/util/console.py b/sphinx/util/console.py index 48b566283..cc22390a5 100644 --- a/sphinx/util/console.py +++ b/sphinx/util/console.py @@ -1,12 +1,4 @@ -""" - sphinx.util.console - ~~~~~~~~~~~~~~~~~~~ - - Format colored console output. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Format colored console output.""" import os import re diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py index a599c66a7..7a2f802c5 100644 --- a/sphinx/util/docfields.py +++ b/sphinx/util/docfields.py @@ -1,12 +1,7 @@ -""" - sphinx.util.docfields - ~~~~~~~~~~~~~~~~~~~~~ - - "Doc fields" are reST field lists in object descriptions that will - be domain-specifically transformed to a more appealing presentation. +"""Utility code for "Doc fields". - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +"Doc fields" are reST field lists in object descriptions that will +be domain-specifically transformed to a more appealing presentation. """ from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, Union, cast diff --git a/sphinx/util/docstrings.py b/sphinx/util/docstrings.py index 620edf8c7..11c823b33 100644 --- a/sphinx/util/docstrings.py +++ b/sphinx/util/docstrings.py @@ -1,12 +1,4 @@ -""" - sphinx.util.docstrings - ~~~~~~~~~~~~~~~~~~~~~~ - - Utilities for docstring processing. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Utilities for docstring processing.""" import re import sys diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py index 5ab766649..654a7a98b 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -1,12 +1,4 @@ -""" - sphinx.util.docutils - ~~~~~~~~~~~~~~~~~~~~ - - Utility functions for docutils. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Utility functions for docutils.""" import os import re diff --git a/sphinx/util/fileutil.py b/sphinx/util/fileutil.py index c46a81cb6..f706fa69a 100644 --- a/sphinx/util/fileutil.py +++ b/sphinx/util/fileutil.py @@ -1,12 +1,4 @@ -""" - sphinx.util.fileutil - ~~~~~~~~~~~~~~~~~~~~ - - File utility functions for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""File utility functions for Sphinx.""" import os import posixpath diff --git a/sphinx/util/i18n.py b/sphinx/util/i18n.py index 511a9abee..f3bb002a3 100644 --- a/sphinx/util/i18n.py +++ b/sphinx/util/i18n.py @@ -1,12 +1,4 @@ -""" - sphinx.util.i18n - ~~~~~~~~~~~~~~~~ - - Builder superclass for all builders. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Builder superclass for all builders.""" import os import re diff --git a/sphinx/util/images.py b/sphinx/util/images.py index 12a253791..2def252f4 100644 --- a/sphinx/util/images.py +++ b/sphinx/util/images.py @@ -1,12 +1,4 @@ -""" - sphinx.util.images - ~~~~~~~~~~~~~~~~~~ - - Image utility functions for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Image utility functions for Sphinx.""" import base64 import imghdr diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py index 06920288f..5b4e2586e 100644 --- a/sphinx/util/inspect.py +++ b/sphinx/util/inspect.py @@ -1,12 +1,4 @@ -""" - sphinx.util.inspect - ~~~~~~~~~~~~~~~~~~~ - - Helpers for inspecting Python modules. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Helpers for inspecting Python modules.""" import builtins import contextlib diff --git a/sphinx/util/inventory.py b/sphinx/util/inventory.py index a208affec..7827aec74 100644 --- a/sphinx/util/inventory.py +++ b/sphinx/util/inventory.py @@ -1,12 +1,4 @@ -""" - sphinx.util.inventory - ~~~~~~~~~~~~~~~~~~~~~ - - Inventory utility functions for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Inventory utility functions for Sphinx.""" import os import re import zlib diff --git a/sphinx/util/jsdump.py b/sphinx/util/jsdump.py index 7db70dd5c..ed5aea4ba 100644 --- a/sphinx/util/jsdump.py +++ b/sphinx/util/jsdump.py @@ -1,12 +1,6 @@ -""" - sphinx.util.jsdump - ~~~~~~~~~~~~~~~~~~ - - This module implements a simple JavaScript serializer. - Uses the basestring encode function from simplejson by Bob Ippolito. +"""This module implements a simple JavaScript serializer. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Uses the basestring encode function from simplejson by Bob Ippolito. """ import re diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py index 7294885b5..37fa672af 100644 --- a/sphinx/util/logging.py +++ b/sphinx/util/logging.py @@ -1,12 +1,4 @@ -""" - sphinx.util.logging - ~~~~~~~~~~~~~~~~~~~ - - Logging utility functions for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Logging utility functions for Sphinx.""" import logging import logging.handlers diff --git a/sphinx/util/matching.py b/sphinx/util/matching.py index a89acf9a8..53a893338 100644 --- a/sphinx/util/matching.py +++ b/sphinx/util/matching.py @@ -1,12 +1,4 @@ -""" - sphinx.util.matching - ~~~~~~~~~~~~~~~~~~~~ - - Pattern-matching utility functions for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Pattern-matching utility functions for Sphinx.""" import re from typing import Callable, Dict, Iterable, List, Match, Optional, Pattern diff --git a/sphinx/util/math.py b/sphinx/util/math.py index 664859624..7caf662dc 100644 --- a/sphinx/util/math.py +++ b/sphinx/util/math.py @@ -1,12 +1,4 @@ -""" - sphinx.util.math - ~~~~~~~~~~~~~~~~ - - Utility functions for math. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Utility functions for math.""" from docutils import nodes diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index c16142a2c..4abc3afa4 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -1,12 +1,4 @@ -""" - sphinx.util.nodes - ~~~~~~~~~~~~~~~~~ - - Docutils node-related utility functions for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Docutils node-related utility functions for Sphinx.""" import re import unicodedata diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index 4f69b4f38..1af722fdc 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -1,12 +1,4 @@ -""" - sphinx.util.osutil - ~~~~~~~~~~~~~~~~~~ - - Operating system-related utility functions for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Operating system-related utility functions for Sphinx.""" import contextlib import filecmp diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py index 3f348a8b5..e4bd852b0 100644 --- a/sphinx/util/parallel.py +++ b/sphinx/util/parallel.py @@ -1,12 +1,4 @@ -""" - sphinx.util.parallel - ~~~~~~~~~~~~~~~~~~~~ - - Parallel building utilities. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Parallel building utilities.""" import os import time diff --git a/sphinx/util/png.py b/sphinx/util/png.py index c40f653e6..cb7ee8be4 100644 --- a/sphinx/util/png.py +++ b/sphinx/util/png.py @@ -1,12 +1,4 @@ -""" - sphinx.util.png - ~~~~~~~~~~~~~~~ - - PNG image manipulation helpers. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""PNG image manipulation helpers.""" import binascii import struct diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py index 2b9b67be9..aedbd143d 100644 --- a/sphinx/util/pycompat.py +++ b/sphinx/util/pycompat.py @@ -1,12 +1,4 @@ -""" - sphinx.util.pycompat - ~~~~~~~~~~~~~~~~~~~~ - - Stuff for Python version compatibility. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Stuff for Python version compatibility.""" import warnings from typing import Any, Callable diff --git a/sphinx/util/requests.py b/sphinx/util/requests.py index 581efbfd5..b1bcb6bd3 100644 --- a/sphinx/util/requests.py +++ b/sphinx/util/requests.py @@ -1,12 +1,4 @@ -""" - sphinx.util.requests - ~~~~~~~~~~~~~~~~~~~~ - - Simple requests package loader - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Simple requests package loader""" import sys import warnings diff --git a/sphinx/util/rst.py b/sphinx/util/rst.py index 320efa618..b44cf9848 100644 --- a/sphinx/util/rst.py +++ b/sphinx/util/rst.py @@ -1,12 +1,4 @@ -""" - sphinx.util.rst - ~~~~~~~~~~~~~~~ - - reST helper functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""reST helper functions.""" import re from collections import defaultdict diff --git a/sphinx/util/smartypants.py b/sphinx/util/smartypants.py index 05d3b03bf..bc4171631 100644 --- a/sphinx/util/smartypants.py +++ b/sphinx/util/smartypants.py @@ -1,27 +1,25 @@ -""" - sphinx.util.smartypants - ~~~~~~~~~~~~~~~~~~~~~~~ +"""Deprecated backport of docutils.utils.smartquotes. - This is extracted (with minor adaptations for flake8 compliance) from - docutils’ docutils/utils/smartquotes.py as of revision 8097 (30 May 2017), - in order to backport for Sphinx usage with Docutils < 0.14 extra language - configurations and fixes. Replaces earlier smartypants version as used up - to Sphinx 1.5.6. +This is extracted (with minor adaptations for flake8 compliance) from +docutils’ docutils/utils/smartquotes.py as of revision 8097 (30 May 2017), +in order to backport for Sphinx usage with Docutils < 0.14 extra language +configurations and fixes. Replaces earlier smartypants version as used up +to Sphinx 1.5.6. - :copyright: © 2010 Günter Milde, - original `SmartyPants`_: © 2003 John Gruber - smartypants.py: © 2004, 2007 Chad Miller - :license: Released under the terms of the `2-Clause BSD license`_, in short: +:copyright: © 2010 Günter Milde, + original `SmartyPants`_: © 2003 John Gruber + smartypants.py: © 2004, 2007 Chad Miller +:license: Released under the terms of the `2-Clause BSD license`_, in short: - Copying and distribution of this file, with or without modification, - are permitted in any medium without royalty provided the copyright - notices and this notice are preserved. - This file is offered as-is, without any warranty. + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notices and this notice are preserved. + This file is offered as-is, without any warranty. - .. _SmartyPants: https://daringfireball.net/projects/smartypants/ - .. _2-Clause BSD license: https://spdx.org/licenses/BSD-2-Clause +.. _SmartyPants: https://daringfireball.net/projects/smartypants/ +.. _2-Clause BSD license: https://spdx.org/licenses/BSD-2-Clause - See the LICENSE file and the original docutils code for details. +See the LICENSE file and the original docutils code for details. """ diff --git a/sphinx/util/stemmer/__init__.py b/sphinx/util/stemmer/__init__.py index 65ef04350..ff6c365c7 100644 --- a/sphinx/util/stemmer/__init__.py +++ b/sphinx/util/stemmer/__init__.py @@ -1,12 +1,4 @@ -""" - sphinx.util.stemmer - ~~~~~~~~~~~~~~~~~~~ - - Word stemming utilities for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Word stemming utilities for Sphinx.""" from sphinx.util.stemmer.porter import PorterStemmer diff --git a/sphinx/util/stemmer/porter.py b/sphinx/util/stemmer/porter.py index 52ca31e0c..c4f89eb95 100644 --- a/sphinx/util/stemmer/porter.py +++ b/sphinx/util/stemmer/porter.py @@ -1,30 +1,26 @@ -""" - sphinx.util.stemmer.porter - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Porter Stemming Algorithm +"""Porter Stemming Algorithm - This is the Porter stemming algorithm, ported to Python from the - version coded up in ANSI C by the author. It may be be regarded - as canonical, in that it follows the algorithm presented in +This is the Porter stemming algorithm, ported to Python from the +version coded up in ANSI C by the author. It may be be regarded +as canonical, in that it follows the algorithm presented in - Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, - no. 3, pp 130-137, +Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, +no. 3, pp 130-137, - only differing from it at the points made --DEPARTURE-- below. +only differing from it at the points made --DEPARTURE-- below. - See also https://tartarus.org/martin/PorterStemmer/ +See also https://tartarus.org/martin/PorterStemmer/ - The algorithm as described in the paper could be exactly replicated - by adjusting the points of DEPARTURE, but this is barely necessary, - because (a) the points of DEPARTURE are definitely improvements, and - (b) no encoding of the Porter stemmer I have seen is anything like - as exact as this version, even with the points of DEPARTURE! +The algorithm as described in the paper could be exactly replicated +by adjusting the points of DEPARTURE, but this is barely necessary, +because (a) the points of DEPARTURE are definitely improvements, and +(b) no encoding of the Porter stemmer I have seen is anything like +as exact as this version, even with the points of DEPARTURE! - Release 1: January 2001 +Release 1: January 2001 - :copyright: Copyright 2001 by Vivake Gupta <v@nano.com>. - :license: Public Domain ("can be used free of charge for any purpose"). +:author: Vivake Gupta <v@nano.com>. +:license: Public Domain ("can be used free of charge for any purpose"). """ diff --git a/sphinx/util/tags.py b/sphinx/util/tags.py index 67c023643..89276732d 100644 --- a/sphinx/util/tags.py +++ b/sphinx/util/tags.py @@ -1,11 +1,3 @@ -""" - sphinx.util.tags - ~~~~~~~~~~~~~~~~ - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - from typing import Iterator, List from jinja2 import nodes diff --git a/sphinx/util/template.py b/sphinx/util/template.py index 5d5de52be..5a73515b3 100644 --- a/sphinx/util/template.py +++ b/sphinx/util/template.py @@ -1,12 +1,4 @@ -""" - sphinx.util.template - ~~~~~~~~~~~~~~~~~~~~ - - Templates utility functions for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Templates utility functions for Sphinx.""" import os from functools import partial diff --git a/sphinx/util/texescape.py b/sphinx/util/texescape.py index 7efbb29ae..83c78bb38 100644 --- a/sphinx/util/texescape.py +++ b/sphinx/util/texescape.py @@ -1,12 +1,4 @@ -""" - sphinx.util.texescape - ~~~~~~~~~~~~~~~~~~~~~ - - TeX escaping helper. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""TeX escaping helper.""" import re from typing import Dict diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py index f47788005..1534b2c8e 100644 --- a/sphinx/util/typing.py +++ b/sphinx/util/typing.py @@ -1,12 +1,4 @@ -""" - sphinx.util.typing - ~~~~~~~~~~~~~~~~~~ - - The composite types for Sphinx. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""The composite types for Sphinx.""" import sys import typing diff --git a/sphinx/versioning.py b/sphinx/versioning.py index 1a615101d..06cf33cc0 100644 --- a/sphinx/versioning.py +++ b/sphinx/versioning.py @@ -1,13 +1,4 @@ -""" - sphinx.versioning - ~~~~~~~~~~~~~~~~~ - - Implements the low-level algorithms Sphinx uses for the versioning of - doctrees. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Implements the low-level algorithms Sphinx uses for versioning doctrees.""" import pickle from itertools import product, zip_longest from operator import itemgetter diff --git a/sphinx/writers/__init__.py b/sphinx/writers/__init__.py index 0f8451bc9..e90088e6d 100644 --- a/sphinx/writers/__init__.py +++ b/sphinx/writers/__init__.py @@ -1,9 +1 @@ -""" - sphinx.writers - ~~~~~~~~~~~~~~ - - Custom docutils writers. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Custom docutils writers.""" diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py index 34b73a0a5..49a4b0349 100644 --- a/sphinx/writers/html.py +++ b/sphinx/writers/html.py @@ -1,12 +1,4 @@ -""" - sphinx.writers.html - ~~~~~~~~~~~~~~~~~~~ - - docutils writers handling Sphinx' custom nodes. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""docutils writers handling Sphinx' custom nodes.""" import os import posixpath diff --git a/sphinx/writers/html5.py b/sphinx/writers/html5.py index b9d0f648c..43d403e6d 100644 --- a/sphinx/writers/html5.py +++ b/sphinx/writers/html5.py @@ -1,12 +1,4 @@ -""" - sphinx.writers.html5 - ~~~~~~~~~~~~~~~~~~~~ - - Experimental docutils writers for HTML5 handling Sphinx's custom nodes. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Experimental docutils writers for HTML5 handling Sphinx's custom nodes.""" import os import posixpath diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 5afc5fca7..1800a8bd3 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1,14 +1,7 @@ -""" - sphinx.writers.latex - ~~~~~~~~~~~~~~~~~~~~ - - Custom docutils writer for LaTeX. - - Much of this code is adapted from Dave Kuhlman's "docpy" writer from his - docutils sandbox. +"""Custom docutils writer for LaTeX. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Much of this code is adapted from Dave Kuhlman's "docpy" writer from his +docutils sandbox. """ import re diff --git a/sphinx/writers/manpage.py b/sphinx/writers/manpage.py index 0344d82e9..10e91f4a3 100644 --- a/sphinx/writers/manpage.py +++ b/sphinx/writers/manpage.py @@ -1,12 +1,4 @@ -""" - sphinx.writers.manpage - ~~~~~~~~~~~~~~~~~~~~~~ - - Manual page writer, extended for Sphinx custom nodes. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Manual page writer, extended for Sphinx custom nodes.""" from typing import Any, Dict, Iterable, cast diff --git a/sphinx/writers/texinfo.py b/sphinx/writers/texinfo.py index 7913972a9..b40f032b4 100644 --- a/sphinx/writers/texinfo.py +++ b/sphinx/writers/texinfo.py @@ -1,12 +1,4 @@ -""" - sphinx.writers.texinfo - ~~~~~~~~~~~~~~~~~~~~~~ - - Custom docutils writer for Texinfo. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Custom docutils writer for Texinfo.""" import re import textwrap diff --git a/sphinx/writers/text.py b/sphinx/writers/text.py index 9fef050c1..8df01012c 100644 --- a/sphinx/writers/text.py +++ b/sphinx/writers/text.py @@ -1,12 +1,4 @@ -""" - sphinx.writers.text - ~~~~~~~~~~~~~~~~~~~ - - Custom docutils writer for plain text. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Custom docutils writer for plain text.""" import math import os import re diff --git a/sphinx/writers/xml.py b/sphinx/writers/xml.py index f9fb22784..5f9aad7fa 100644 --- a/sphinx/writers/xml.py +++ b/sphinx/writers/xml.py @@ -1,12 +1,4 @@ -""" - sphinx.writers.xml - ~~~~~~~~~~~~~~~~~~ - - Docutils-native XML and pseudo-XML writers. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Docutils-native XML and pseudo-XML writers.""" from typing import Any diff --git a/tests/conftest.py b/tests/conftest.py index dd1a04513..ebbc9e2c7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,11 +1,3 @@ -""" - pytest config for sphinx/tests - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - import os import shutil diff --git a/tests/ext_napoleon_pep526_data_google.py b/tests/ext_napoleon_pep526_data_google.py index 0a4676d89..bb55b0fc2 100644 --- a/tests/ext_napoleon_pep526_data_google.py +++ b/tests/ext_napoleon_pep526_data_google.py @@ -1,6 +1,4 @@ -""" -Test module for napoleon PEP 526 compatibility with google style -""" +"""Test module for napoleon PEP 526 compatibility with google style""" module_level_var: int = 99 """This is an example module level variable""" diff --git a/tests/ext_napoleon_pep526_data_numpy.py b/tests/ext_napoleon_pep526_data_numpy.py index a421f53fe..b3093a7f4 100644 --- a/tests/ext_napoleon_pep526_data_numpy.py +++ b/tests/ext_napoleon_pep526_data_numpy.py @@ -1,6 +1,4 @@ -""" -Test module for napoleon PEP 526 compatibility with numpy style -""" +"""Test module for napoleon PEP 526 compatibility with numpy style""" module_level_var: int = 99 """This is an example module level variable""" diff --git a/tests/roots/test-inheritance/dummy/test_nested.py b/tests/roots/test-inheritance/dummy/test_nested.py index 1e732aab5..89289fe44 100644 --- a/tests/roots/test-inheritance/dummy/test_nested.py +++ b/tests/roots/test-inheritance/dummy/test_nested.py @@ -1,5 +1,4 @@ -""" - Test with nested classes. +"""Test with nested classes. """ diff --git a/tests/test_api_translator.py b/tests/test_api_translator.py index dd721355b..aad5a2ccc 100644 --- a/tests/test_api_translator.py +++ b/tests/test_api_translator.py @@ -1,12 +1,4 @@ -""" - test_api_translator - ~~~~~~~~~~~~~~~~~~~ - - Test the Sphinx API for translator. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the Sphinx API for translator.""" import sys diff --git a/tests/test_application.py b/tests/test_application.py index fc85f193d..365fff8ea 100644 --- a/tests/test_application.py +++ b/tests/test_application.py @@ -1,12 +1,4 @@ -""" - test_application - ~~~~~~~~~~~~~~~~ - - Test the Sphinx class. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the Sphinx class.""" from unittest.mock import Mock diff --git a/tests/test_build.py b/tests/test_build.py index 76de332ee..f2af19565 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -1,12 +1,4 @@ -""" - test_build - ~~~~~~~~~~ - - Test all builders. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test all builders.""" import sys from textwrap import dedent diff --git a/tests/test_build_changes.py b/tests/test_build_changes.py index 65307ba92..a4a07619b 100644 --- a/tests/test_build_changes.py +++ b/tests/test_build_changes.py @@ -1,12 +1,4 @@ -""" - test_build_changes - ~~~~~~~~~~~~~~~~~~ - - Test the ChangesBuilder class. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the ChangesBuilder class.""" import pytest diff --git a/tests/test_build_dirhtml.py b/tests/test_build_dirhtml.py index a7a90623c..25598f795 100644 --- a/tests/test_build_dirhtml.py +++ b/tests/test_build_dirhtml.py @@ -1,12 +1,4 @@ -""" - test_build_dirhtml - ~~~~~~~~~~~~~~~~~~ - - Test dirhtml builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test dirhtml builder.""" import posixpath diff --git a/tests/test_build_epub.py b/tests/test_build_epub.py index 851e8ac9d..4ba29df85 100644 --- a/tests/test_build_epub.py +++ b/tests/test_build_epub.py @@ -1,12 +1,4 @@ -""" - test_build_html - ~~~~~~~~~~~~~~~ - - Test the HTML builder and check output against XPath. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the HTML builder and check output against XPath.""" import os import subprocess diff --git a/tests/test_build_gettext.py b/tests/test_build_gettext.py index 9398dfe5f..6d80324bd 100644 --- a/tests/test_build_gettext.py +++ b/tests/test_build_gettext.py @@ -1,12 +1,4 @@ -""" - test_build_gettext - ~~~~~~~~~~~~~~~~~~ - - Test the build process with gettext builder with the test root. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the build process with gettext builder with the test root.""" import gettext import os diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 7688f76b3..f50f72a9c 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -1,12 +1,4 @@ -""" - test_build_html - ~~~~~~~~~~~~~~~ - - Test the HTML builder and check output against XPath. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the HTML builder and check output against XPath.""" import os import re diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index b0ae85423..938e8a820 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -1,12 +1,4 @@ -""" - test_build_latex - ~~~~~~~~~~~~~~~~ - - Test the build process with LaTeX builder with the test root. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the build process with LaTeX builder with the test root.""" import os import re diff --git a/tests/test_build_linkcheck.py b/tests/test_build_linkcheck.py index 358db6a4e..d5684ba6c 100644 --- a/tests/test_build_linkcheck.py +++ b/tests/test_build_linkcheck.py @@ -1,12 +1,4 @@ -""" - test_build_linkcheck - ~~~~~~~~~~~~~~~~~~~~ - - Test the build process with manpage builder with the test root. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the build process with manpage builder with the test root.""" import http.server import json diff --git a/tests/test_build_manpage.py b/tests/test_build_manpage.py index 1a14c9bf7..c6139c2bf 100644 --- a/tests/test_build_manpage.py +++ b/tests/test_build_manpage.py @@ -1,12 +1,4 @@ -""" - test_build_manpage - ~~~~~~~~~~~~~~~~~~ - - Test the build process with manpage builder with the test root. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the build process with manpage builder with the test root.""" import pytest diff --git a/tests/test_build_texinfo.py b/tests/test_build_texinfo.py index 601de1587..ccdbd9bd3 100644 --- a/tests/test_build_texinfo.py +++ b/tests/test_build_texinfo.py @@ -1,12 +1,4 @@ -""" - test_build_texinfo - ~~~~~~~~~~~~~~~~~~ - - Test the build process with Texinfo builder with the test root. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the build process with Texinfo builder with the test root.""" import os import re diff --git a/tests/test_build_text.py b/tests/test_build_text.py index c080d2ad2..0578e425e 100644 --- a/tests/test_build_text.py +++ b/tests/test_build_text.py @@ -1,12 +1,4 @@ -""" - test_build_text - ~~~~~~~~~~~~~~~ - - Test the build process with Text builder with the test root. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the build process with Text builder with the test root.""" import pytest from docutils.utils import column_width diff --git a/tests/test_builder.py b/tests/test_builder.py index 4927e5d1d..c866a9720 100644 --- a/tests/test_builder.py +++ b/tests/test_builder.py @@ -1,12 +1,4 @@ -""" - test_builder - ~~~~~~~~ - - Test the Builder class. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the Builder class.""" import pytest diff --git a/tests/test_catalogs.py b/tests/test_catalogs.py index 319e6a07d..74aa7077a 100644 --- a/tests/test_catalogs.py +++ b/tests/test_catalogs.py @@ -1,12 +1,4 @@ -""" - test_build_base - ~~~~~~~~~~~~~~~ - - Test the base build process. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the base build process.""" import shutil import pytest diff --git a/tests/test_config.py b/tests/test_config.py index 97e911eb5..7981dd7a9 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,13 +1,4 @@ -""" - test_config - ~~~~~~~~~~~ - - Test the sphinx.config.Config class and its handling in the - Application class. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the sphinx.config.Config class.""" from unittest import mock diff --git a/tests/test_correct_year.py b/tests/test_correct_year.py index bcb217036..3855df913 100644 --- a/tests/test_correct_year.py +++ b/tests/test_correct_year.py @@ -1,12 +1,4 @@ -""" - test_correct_year - ~~~~~~~~~~~~~~~~~ - - Test copyright year adjustment - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test copyright year adjustment""" import pytest diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py index 5f519d3b9..98a9aa899 100644 --- a/tests/test_directive_code.py +++ b/tests/test_directive_code.py @@ -1,12 +1,4 @@ -""" - test_directive_code - ~~~~~~~~~~~~~~~~~~~ - - Test the code-block directive. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the code-block directive.""" import os diff --git a/tests/test_directive_only.py b/tests/test_directive_only.py index 164220e33..2e9ea634c 100644 --- a/tests/test_directive_only.py +++ b/tests/test_directive_only.py @@ -1,12 +1,4 @@ -""" - test_only_directive - ~~~~~~~~~~~~~~~~~~~ - - Test the only directive with the test root. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the only directive with the test root.""" import re diff --git a/tests/test_directive_other.py b/tests/test_directive_other.py index e1858f4e0..f221db075 100644 --- a/tests/test_directive_other.py +++ b/tests/test_directive_other.py @@ -1,12 +1,4 @@ -""" - test_directive_other - ~~~~~~~~~~~~~~~~~~~~ - - Test the other directives. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the other directives.""" import pytest from docutils import nodes diff --git a/tests/test_directive_patch.py b/tests/test_directive_patch.py index a199a89db..f4eb8f9db 100644 --- a/tests/test_directive_patch.py +++ b/tests/test_directive_patch.py @@ -1,12 +1,4 @@ -""" - test_directive_patch - ~~~~~~~~~~~~~~~~~~~ - - Test the patched directives. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the patched directives.""" import pytest from docutils import nodes diff --git a/tests/test_docutilsconf.py b/tests/test_docutilsconf.py index 7e47c9ab3..def6cb67d 100644 --- a/tests/test_docutilsconf.py +++ b/tests/test_docutilsconf.py @@ -1,12 +1,4 @@ -""" - test_docutilsconf - ~~~~~~~~~~~~~~~~~ - - Test docutils.conf support for several writers. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test docutils.conf support for several writers.""" import pytest from docutils import nodes diff --git a/tests/test_domain_c.py b/tests/test_domain_c.py index f69008b8f..16a71d9fe 100644 --- a/tests/test_domain_c.py +++ b/tests/test_domain_c.py @@ -1,12 +1,4 @@ -""" - test_domain_c - ~~~~~~~~~~~~~ - - Tests the C Domain - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests the C Domain""" import itertools import zlib diff --git a/tests/test_domain_cpp.py b/tests/test_domain_cpp.py index 389f77f7c..72ffc474d 100644 --- a/tests/test_domain_cpp.py +++ b/tests/test_domain_cpp.py @@ -1,12 +1,4 @@ -""" - test_domain_cpp - ~~~~~~~~~~~~~~~ - - Tests the C++ Domain - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests the C++ Domain""" import itertools import re diff --git a/tests/test_domain_js.py b/tests/test_domain_js.py index b109fe4d8..465fef328 100644 --- a/tests/test_domain_js.py +++ b/tests/test_domain_js.py @@ -1,12 +1,4 @@ -""" - test_domain_js - ~~~~~~~~~~~~~~ - - Tests the JavaScript Domain - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests the JavaScript Domain""" from unittest.mock import Mock diff --git a/tests/test_domain_py.py b/tests/test_domain_py.py index de544d25d..4205ada13 100644 --- a/tests/test_domain_py.py +++ b/tests/test_domain_py.py @@ -1,12 +1,4 @@ -""" - test_domain_py - ~~~~~~~~~~~~~~ - - Tests the Python Domain - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests the Python Domain""" import re import sys diff --git a/tests/test_domain_rst.py b/tests/test_domain_rst.py index b79431d49..df19ffdb2 100644 --- a/tests/test_domain_rst.py +++ b/tests/test_domain_rst.py @@ -1,12 +1,4 @@ -""" - test_rst_domain - ~~~~~~~~~~~~~~~ - - Tests the reStructuredText domain. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests the reStructuredText domain.""" from sphinx import addnodes from sphinx.addnodes import (desc, desc_addname, desc_annotation, desc_content, desc_name, diff --git a/tests/test_domain_std.py b/tests/test_domain_std.py index 00e7361a3..e92030517 100644 --- a/tests/test_domain_std.py +++ b/tests/test_domain_std.py @@ -1,12 +1,4 @@ -""" - test_domain_std - ~~~~~~~~~~~~~~~ - - Tests the std domain - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests the std domain""" from unittest import mock diff --git a/tests/test_environment.py b/tests/test_environment.py index d8eec2c05..7ffca7898 100644 --- a/tests/test_environment.py +++ b/tests/test_environment.py @@ -1,12 +1,4 @@ -""" - test_env - ~~~~~~~~ - - Test the BuildEnvironment class. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the BuildEnvironment class.""" import os import shutil diff --git a/tests/test_environment_indexentries.py b/tests/test_environment_indexentries.py index f32592f9f..5b7678499 100644 --- a/tests/test_environment_indexentries.py +++ b/tests/test_environment_indexentries.py @@ -1,12 +1,4 @@ -""" - test_environment_indexentries - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the sphinx.environment.managers.indexentries. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the sphinx.environment.managers.indexentries.""" import pytest diff --git a/tests/test_environment_toctree.py b/tests/test_environment_toctree.py index dc5a184a4..588bcac18 100644 --- a/tests/test_environment_toctree.py +++ b/tests/test_environment_toctree.py @@ -1,12 +1,4 @@ -""" - test_environment_toctree - ~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the sphinx.environment.managers.toctree. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the sphinx.environment.managers.toctree.""" import pytest from docutils import nodes diff --git a/tests/test_events.py b/tests/test_events.py index 44b0526d1..f36c86a87 100644 --- a/tests/test_events.py +++ b/tests/test_events.py @@ -1,12 +1,4 @@ -""" - test_events - ~~~~~~~~~~~ - - Test the EventManager class. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the EventManager class.""" import pytest diff --git a/tests/test_ext_apidoc.py b/tests/test_ext_apidoc.py index 44c3308fe..7aba847a3 100644 --- a/tests/test_ext_apidoc.py +++ b/tests/test_ext_apidoc.py @@ -1,12 +1,4 @@ -""" - test_apidoc - ~~~~~~~~~~~ - - Test the sphinx.apidoc module. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the sphinx.apidoc module.""" from collections import namedtuple diff --git a/tests/test_ext_autodoc.py b/tests/test_ext_autodoc.py index 62bbf83d0..3cbfe2eea 100644 --- a/tests/test_ext_autodoc.py +++ b/tests/test_ext_autodoc.py @@ -1,12 +1,7 @@ -""" - test_ext_autodoc - ~~~~~~~~~~~~~~~~ - - Test the autodoc extension. This tests mainly the Documenters; the auto - directives are tested in a test source file translated by test_build. +"""Test the autodoc extension. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +This tests mainly the Documenters; the auto directives are tested in a test +source file translated by test_build. """ import sys diff --git a/tests/test_ext_autodoc_autoattribute.py b/tests/test_ext_autodoc_autoattribute.py index fec4da463..ec48f08b3 100644 --- a/tests/test_ext_autodoc_autoattribute.py +++ b/tests/test_ext_autodoc_autoattribute.py @@ -1,12 +1,7 @@ -""" - test_ext_autodoc_autoattribute - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. This tests mainly the Documenters; the auto - directives are tested in a test source file translated by test_build. +"""Test the autodoc extension. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +This tests mainly the Documenters; the auto directives are tested in a test +source file translated by test_build. """ import sys diff --git a/tests/test_ext_autodoc_autoclass.py b/tests/test_ext_autodoc_autoclass.py index e68c72a58..508e63782 100644 --- a/tests/test_ext_autodoc_autoclass.py +++ b/tests/test_ext_autodoc_autoclass.py @@ -1,12 +1,7 @@ -""" - test_ext_autodoc_autoclass - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. This tests mainly the Documenters; the auto - directives are tested in a test source file translated by test_build. +"""Test the autodoc extension. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +This tests mainly the Documenters; the auto directives are tested in a test +source file translated by test_build. """ import sys diff --git a/tests/test_ext_autodoc_autodata.py b/tests/test_ext_autodoc_autodata.py index 7d6d9eb30..e8c14d27a 100644 --- a/tests/test_ext_autodoc_autodata.py +++ b/tests/test_ext_autodoc_autodata.py @@ -1,12 +1,7 @@ -""" - test_ext_autodoc_autodata - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. This tests mainly the Documenters; the auto - directives are tested in a test source file translated by test_build. +"""Test the autodoc extension. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +This tests mainly the Documenters; the auto directives are tested in a test +source file translated by test_build. """ import sys diff --git a/tests/test_ext_autodoc_autofunction.py b/tests/test_ext_autodoc_autofunction.py index 6489626d2..55a308300 100644 --- a/tests/test_ext_autodoc_autofunction.py +++ b/tests/test_ext_autodoc_autofunction.py @@ -1,12 +1,7 @@ -""" - test_ext_autodoc_autofunction - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. This tests mainly the Documenters; the auto - directives are tested in a test source file translated by test_build. +"""Test the autodoc extension. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +This tests mainly the Documenters; the auto directives are tested in a test +source file translated by test_build. """ import pytest diff --git a/tests/test_ext_autodoc_automodule.py b/tests/test_ext_autodoc_automodule.py index 05a73ac81..6b356e584 100644 --- a/tests/test_ext_autodoc_automodule.py +++ b/tests/test_ext_autodoc_automodule.py @@ -1,12 +1,7 @@ -""" - test_ext_autodoc_autocmodule - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. This tests mainly the Documenters; the auto - directives are tested in a test source file translated by test_build. +"""Test the autodoc extension. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +This tests mainly the Documenters; the auto directives are tested in a test +source file translated by test_build. """ import sys diff --git a/tests/test_ext_autodoc_autoproperty.py b/tests/test_ext_autodoc_autoproperty.py index 4b62165e3..3d50020b3 100644 --- a/tests/test_ext_autodoc_autoproperty.py +++ b/tests/test_ext_autodoc_autoproperty.py @@ -1,12 +1,7 @@ -""" - test_ext_autodoc_autoproperty - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. This tests mainly the Documenters; the auto - directives are tested in a test source file translated by test_build. +"""Test the autodoc extension. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +This tests mainly the Documenters; the auto directives are tested in a test +source file translated by test_build. """ import sys diff --git a/tests/test_ext_autodoc_configs.py b/tests/test_ext_autodoc_configs.py index c5a1ab8f6..070eafe75 100644 --- a/tests/test_ext_autodoc_configs.py +++ b/tests/test_ext_autodoc_configs.py @@ -1,12 +1,4 @@ -""" - test_ext_autodoc_configs - ~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. This tests mainly for config variables - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the autodoc extension. This tests mainly for config variables""" import platform import sys diff --git a/tests/test_ext_autodoc_events.py b/tests/test_ext_autodoc_events.py index 6a71054c2..91e1d27d2 100644 --- a/tests/test_ext_autodoc_events.py +++ b/tests/test_ext_autodoc_events.py @@ -1,12 +1,4 @@ -""" - test_ext_autodoc_events - ~~~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. This tests mainly for autodoc events - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the autodoc extension. This tests mainly for autodoc events""" import pytest diff --git a/tests/test_ext_autodoc_mock.py b/tests/test_ext_autodoc_mock.py index c207c82fc..0f3288c28 100644 --- a/tests/test_ext_autodoc_mock.py +++ b/tests/test_ext_autodoc_mock.py @@ -1,12 +1,4 @@ -""" - test_ext_autodoc_mock - ~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the autodoc extension.""" import abc import sys diff --git a/tests/test_ext_autodoc_preserve_defaults.py b/tests/test_ext_autodoc_preserve_defaults.py index a7a24e026..563bfe35b 100644 --- a/tests/test_ext_autodoc_preserve_defaults.py +++ b/tests/test_ext_autodoc_preserve_defaults.py @@ -1,12 +1,4 @@ -""" - test_ext_autodoc_preserve_defaults - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the autodoc extension.""" import sys diff --git a/tests/test_ext_autodoc_private_members.py b/tests/test_ext_autodoc_private_members.py index f685f774c..bdb947821 100644 --- a/tests/test_ext_autodoc_private_members.py +++ b/tests/test_ext_autodoc_private_members.py @@ -1,11 +1,4 @@ -""" - test_ext_autodoc_private_members - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test the autodoc extension. This tests mainly for private-members option. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +"""Test the autodoc extension. This tests mainly for private-members option. """ import pytest diff --git a/tests/test_ext_autosectionlabel.py b/tests/test_ext_autosectionlabel.py index ccbc9ed77..7345ca3ff 100644 --- a/tests/test_ext_autosectionlabel.py +++ b/tests/test_ext_autosectionlabel.py @@ -1,12 +1,4 @@ -""" - test_ext_autosectionlabel - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test sphinx.ext.autosectionlabel extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.ext.autosectionlabel extension.""" import re diff --git a/tests/test_ext_autosummary.py b/tests/test_ext_autosummary.py index 13da15e50..fd77db816 100644 --- a/tests/test_ext_autosummary.py +++ b/tests/test_ext_autosummary.py @@ -1,12 +1,4 @@ -""" - test_autosummary - ~~~~~~~~~~~~~~~~ - - Test the autosummary extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the autosummary extension.""" import sys from io import StringIO diff --git a/tests/test_ext_coverage.py b/tests/test_ext_coverage.py index 6d6fbcf1d..ee179a86b 100644 --- a/tests/test_ext_coverage.py +++ b/tests/test_ext_coverage.py @@ -1,12 +1,4 @@ -""" - test_coverage - ~~~~~~~~~~~~~ - - Test the coverage builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the coverage builder.""" import pickle diff --git a/tests/test_ext_doctest.py b/tests/test_ext_doctest.py index 3a527acb2..6e8a4123e 100644 --- a/tests/test_ext_doctest.py +++ b/tests/test_ext_doctest.py @@ -1,12 +1,4 @@ -""" - test_doctest - ~~~~~~~~~~~~ - - Test the doctest extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the doctest extension.""" import os from collections import Counter diff --git a/tests/test_ext_duration.py b/tests/test_ext_duration.py index b16cbc4f4..4fa4dfc30 100644 --- a/tests/test_ext_duration.py +++ b/tests/test_ext_duration.py @@ -1,12 +1,4 @@ -""" - test_ext_duration - ~~~~~~~~~~~~~~~~~ - - Test sphinx.ext.duration extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.ext.duration extension.""" import re diff --git a/tests/test_ext_githubpages.py b/tests/test_ext_githubpages.py index 9d87b0212..445719e12 100644 --- a/tests/test_ext_githubpages.py +++ b/tests/test_ext_githubpages.py @@ -1,12 +1,4 @@ -""" - test_ext_githubpages - ~~~~~~~~~~~~~~~~~~~~ - - Test sphinx.ext.githubpages extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.ext.githubpages extension.""" import pytest diff --git a/tests/test_ext_graphviz.py b/tests/test_ext_graphviz.py index 15eaf6050..7ffe7ead2 100644 --- a/tests/test_ext_graphviz.py +++ b/tests/test_ext_graphviz.py @@ -1,12 +1,4 @@ -""" - test_ext_graphviz - ~~~~~~~~~~~~~~~~~ - - Test sphinx.ext.graphviz extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.ext.graphviz extension.""" import re diff --git a/tests/test_ext_ifconfig.py b/tests/test_ext_ifconfig.py index f8f897149..3c4651b3f 100644 --- a/tests/test_ext_ifconfig.py +++ b/tests/test_ext_ifconfig.py @@ -1,12 +1,4 @@ -""" - test_ext_ifconfig - ~~~~~~~~~~~~~~~~~ - - Test sphinx.ext.ifconfig extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.ext.ifconfig extension.""" import pytest diff --git a/tests/test_ext_imgconverter.py b/tests/test_ext_imgconverter.py index b4dbf125b..134947c87 100644 --- a/tests/test_ext_imgconverter.py +++ b/tests/test_ext_imgconverter.py @@ -1,12 +1,4 @@ -""" - test_ext_imgconverter - ~~~~~~~~~~~~~~~~~~~~~ - - Test sphinx.ext.imgconverter extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.ext.imgconverter extension.""" import os diff --git a/tests/test_ext_inheritance_diagram.py b/tests/test_ext_inheritance_diagram.py index bd563b4fc..a6218eccc 100644 --- a/tests/test_ext_inheritance_diagram.py +++ b/tests/test_ext_inheritance_diagram.py @@ -1,12 +1,4 @@ -""" - test_ext_inheritance_diagram - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Test sphinx.ext.inheritance_diagram extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.ext.inheritance_diagram extension.""" import os import re diff --git a/tests/test_ext_intersphinx.py b/tests/test_ext_intersphinx.py index b2ad8afe5..7d52ff95e 100644 --- a/tests/test_ext_intersphinx.py +++ b/tests/test_ext_intersphinx.py @@ -1,12 +1,4 @@ -""" - test_intersphinx - ~~~~~~~~~~~~~~~~ - - Test the intersphinx extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the intersphinx extension.""" import http.server import os diff --git a/tests/test_ext_math.py b/tests/test_ext_math.py index 5dd713961..e3345e627 100644 --- a/tests/test_ext_math.py +++ b/tests/test_ext_math.py @@ -1,12 +1,4 @@ -""" - test_ext_math - ~~~~~~~~~~~~~ - - Test math extensions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test math extensions.""" import re import subprocess diff --git a/tests/test_ext_napoleon.py b/tests/test_ext_napoleon.py index 250fdae26..a1b98996f 100644 --- a/tests/test_ext_napoleon.py +++ b/tests/test_ext_napoleon.py @@ -1,13 +1,4 @@ -""" - test_napoleon - ~~~~~~~~~~~~~ - - Tests for :mod:`sphinx.ext.napoleon.__init__` module. - - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests for :mod:`sphinx.ext.napoleon.__init__` module.""" import sys from collections import namedtuple diff --git a/tests/test_ext_napoleon_docstring.py b/tests/test_ext_napoleon_docstring.py index 21278dbca..ed97b6351 100644 --- a/tests/test_ext_napoleon_docstring.py +++ b/tests/test_ext_napoleon_docstring.py @@ -1,13 +1,4 @@ -""" - test_napoleon_docstring - ~~~~~~~~~~~~~~~~~~~~~~~ - - Tests for :mod:`sphinx.ext.napoleon.docstring` module. - - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests for :mod:`sphinx.ext.napoleon.docstring` module.""" import re import sys diff --git a/tests/test_ext_napoleon_iterators.py b/tests/test_ext_napoleon_iterators.py index 95c2778e8..6b80af6bf 100644 --- a/tests/test_ext_napoleon_iterators.py +++ b/tests/test_ext_napoleon_iterators.py @@ -1,13 +1,4 @@ -""" - test_napoleon_iterators - ~~~~~~~~~~~~~~~~~~~~~~~ - - Tests for :mod:`sphinx.ext.napoleon.iterators` module. - - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests for :mod:`sphinx.ext.napoleon.iterators` module.""" from unittest import TestCase diff --git a/tests/test_ext_todo.py b/tests/test_ext_todo.py index 3bc2abadf..ffe8bd995 100644 --- a/tests/test_ext_todo.py +++ b/tests/test_ext_todo.py @@ -1,12 +1,4 @@ -""" - test_ext_todo - ~~~~~~~~~~~~~ - - Test sphinx.ext.todo extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.ext.todo extension.""" import re diff --git a/tests/test_ext_viewcode.py b/tests/test_ext_viewcode.py index 140b2a728..c2e195428 100644 --- a/tests/test_ext_viewcode.py +++ b/tests/test_ext_viewcode.py @@ -1,12 +1,4 @@ -""" - test_ext_viewcode - ~~~~~~~~~~~~~~~~~ - - Test sphinx.ext.viewcode extension. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.ext.viewcode extension.""" import re diff --git a/tests/test_extension.py b/tests/test_extension.py index 4e7fffffa..d74743cca 100644 --- a/tests/test_extension.py +++ b/tests/test_extension.py @@ -1,12 +1,4 @@ -""" - test_extension - ~~~~~~~~~~~~~~ - - Test sphinx.extension module. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.extension module.""" import pytest diff --git a/tests/test_highlighting.py b/tests/test_highlighting.py index d83f2f1cc..92276a21c 100644 --- a/tests/test_highlighting.py +++ b/tests/test_highlighting.py @@ -1,12 +1,4 @@ -""" - test_highlighting - ~~~~~~~~~~~~~~~~~ - - Test the Pygments highlighting bridge. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the Pygments highlighting bridge.""" from unittest import mock diff --git a/tests/test_intl.py b/tests/test_intl.py index 62dbb1352..44740f67d 100644 --- a/tests/test_intl.py +++ b/tests/test_intl.py @@ -1,12 +1,6 @@ -""" - test_intl - ~~~~~~~~~ - - Test message patching for internationalization purposes. Runs the text - builder in the test root. +"""Test message patching for internationalization purposes. - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +Runs the text builder in the test root. """ import os diff --git a/tests/test_locale.py b/tests/test_locale.py index c5765ccdf..1dcad64eb 100644 --- a/tests/test_locale.py +++ b/tests/test_locale.py @@ -1,12 +1,4 @@ -""" - test_locale - ~~~~~~~~~~ - - Test locale. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test locale.""" import pytest diff --git a/tests/test_markup.py b/tests/test_markup.py index dbd0f0272..39ad62784 100644 --- a/tests/test_markup.py +++ b/tests/test_markup.py @@ -1,12 +1,4 @@ -""" - test_markup - ~~~~~~~~~~~ - - Test various Sphinx-specific markup extensions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test various Sphinx-specific markup extensions.""" import re diff --git a/tests/test_metadata.py b/tests/test_metadata.py index a2e26a42b..7f3199705 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -1,12 +1,4 @@ -""" - test_metadata - ~~~~~~~~~~~~~ - - Test our handling of metadata in files with bibliographic metadata. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test our handling of metadata in files with bibliographic metadata.""" # adapted from an example of bibliographic metadata at # https://docutils.sourceforge.io/docs/user/rst/demo.txt diff --git a/tests/test_parser.py b/tests/test_parser.py index cbe9a61df..86163c6ad 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -1,12 +1,4 @@ -""" - test_sphinx_parsers - ~~~~~~~~~~~~~~~~~~~ - - Tests parsers module. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests parsers module.""" from unittest.mock import Mock, patch diff --git a/tests/test_project.py b/tests/test_project.py index dc7f1d35d..40db85ef3 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -1,12 +1,4 @@ -""" - test_project - ~~~~~~~~~~~~ - - Tests project module. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests project module.""" from collections import OrderedDict diff --git a/tests/test_pycode.py b/tests/test_pycode.py index 312c0245d..1f9882eb9 100644 --- a/tests/test_pycode.py +++ b/tests/test_pycode.py @@ -1,12 +1,4 @@ -""" - test_pycode - ~~~~~~~~~~~ - - Test pycode. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test pycode.""" import os import sys diff --git a/tests/test_pycode_ast.py b/tests/test_pycode_ast.py index 0de03d5ea..6143105eb 100644 --- a/tests/test_pycode_ast.py +++ b/tests/test_pycode_ast.py @@ -1,12 +1,4 @@ -""" - test_pycode_ast - ~~~~~~~~~~~~~~~ - - Test pycode.ast - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test pycode.ast""" import sys diff --git a/tests/test_pycode_parser.py b/tests/test_pycode_parser.py index 11e47a86b..5d2496ba5 100644 --- a/tests/test_pycode_parser.py +++ b/tests/test_pycode_parser.py @@ -1,12 +1,4 @@ -""" - test_pycode_parser - ~~~~~~~~~~~~~~~~~~ - - Test pycode.parser. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test pycode.parser.""" from sphinx.pycode.parser import Parser from sphinx.util.inspect import signature_from_str diff --git a/tests/test_quickstart.py b/tests/test_quickstart.py index 0f317c5a8..1ea85b19b 100644 --- a/tests/test_quickstart.py +++ b/tests/test_quickstart.py @@ -1,12 +1,4 @@ -""" - test_quickstart - ~~~~~~~~~~~~~~~ - - Test the sphinx.quickstart module. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the sphinx.quickstart module.""" import time from io import StringIO diff --git a/tests/test_roles.py b/tests/test_roles.py index a7e936376..67a13c8ef 100644 --- a/tests/test_roles.py +++ b/tests/test_roles.py @@ -1,12 +1,4 @@ -""" - test_roles - ~~~~~~~~~~ - - Test sphinx.roles - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.roles""" from unittest.mock import Mock diff --git a/tests/test_search.py b/tests/test_search.py index 4c74ac24a..024e6941c 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -1,12 +1,4 @@ -""" - test_search - ~~~~~~~~~~~ - - Test the search index builder. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the search index builder.""" from collections import namedtuple from io import BytesIO diff --git a/tests/test_setup_command.py b/tests/test_setup_command.py index 0a1176ae6..054912feb 100644 --- a/tests/test_setup_command.py +++ b/tests/test_setup_command.py @@ -1,12 +1,4 @@ -""" - test_setup_command - ~~~~~~~~~~~~~~~~~~~ - - Test setup_command for distutils. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test setup_command for distutils.""" import os import subprocess diff --git a/tests/test_smartquotes.py b/tests/test_smartquotes.py index bd8216167..6cfb716e4 100644 --- a/tests/test_smartquotes.py +++ b/tests/test_smartquotes.py @@ -1,12 +1,4 @@ -""" - test_smartquotes - ~~~~~~~~~~~~~~~~ - - Test smart quotes. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test smart quotes.""" import pytest from html5lib import HTMLParser diff --git a/tests/test_templating.py b/tests/test_templating.py index 37e280c3b..7a6f1f004 100644 --- a/tests/test_templating.py +++ b/tests/test_templating.py @@ -1,12 +1,4 @@ -""" - test_templating - ~~~~~~~~~~~~~~~~ - - Test templating. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test templating.""" import pytest diff --git a/tests/test_theming.py b/tests/test_theming.py index 60dd72cdf..21382d84b 100644 --- a/tests/test_theming.py +++ b/tests/test_theming.py @@ -1,12 +1,4 @@ -""" - test_theming - ~~~~~~~~~~~~ - - Test the Theme class. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the Theme class.""" import os diff --git a/tests/test_toctree.py b/tests/test_toctree.py index 33e73c98c..e1afa4bb9 100644 --- a/tests/test_toctree.py +++ b/tests/test_toctree.py @@ -1,12 +1,4 @@ -""" - test_toctree - ~~~~~~~~~~~~ - - Test the HTML builder and check output against XPath. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the HTML builder and check output against XPath.""" import re import pytest diff --git a/tests/test_transforms_post_transforms.py b/tests/test_transforms_post_transforms.py index fe0a7b06b..e5ec8ad14 100644 --- a/tests/test_transforms_post_transforms.py +++ b/tests/test_transforms_post_transforms.py @@ -1,12 +1,4 @@ -""" - test_transforms_post_transforms - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - Tests the post_transforms - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests the post_transforms""" import pytest from docutils import nodes diff --git a/tests/test_transforms_post_transforms_code.py b/tests/test_transforms_post_transforms_code.py index 11369d2ba..2715eb5a5 100644 --- a/tests/test_transforms_post_transforms_code.py +++ b/tests/test_transforms_post_transforms_code.py @@ -1,11 +1,3 @@ -""" - test_transforms_post_transforms_code - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - import pytest diff --git a/tests/test_util.py b/tests/test_util.py index 0023bbcdb..e93e6586c 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,12 +1,4 @@ -""" - test_util - ~~~~~~~~~~~~~~~ - - Tests util functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests util functions.""" import os import tempfile diff --git a/tests/test_util_docstrings.py b/tests/test_util_docstrings.py index 73f155cf3..813e84e97 100644 --- a/tests/test_util_docstrings.py +++ b/tests/test_util_docstrings.py @@ -1,12 +1,4 @@ -""" - test_util_docstrings - ~~~~~~~~~~~~~~~~~~~~ - - Test sphinx.util.docstrings. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test sphinx.util.docstrings.""" from sphinx.util.docstrings import prepare_commentdoc, prepare_docstring, separate_metadata diff --git a/tests/test_util_docutils.py b/tests/test_util_docutils.py index 9a7a05e49..41022dd99 100644 --- a/tests/test_util_docutils.py +++ b/tests/test_util_docutils.py @@ -1,12 +1,4 @@ -""" - test_util_docutils - ~~~~~~~~~~~~~~~~~~ - - Tests util.utils functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests util.utils functions.""" import os diff --git a/tests/test_util_fileutil.py b/tests/test_util_fileutil.py index 4d6edd0ce..27f95e644 100644 --- a/tests/test_util_fileutil.py +++ b/tests/test_util_fileutil.py @@ -1,12 +1,4 @@ -""" - test_util_fileutil - ~~~~~~~~~~~~~~~~~~ - - Tests sphinx.util.fileutil functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests sphinx.util.fileutil functions.""" from unittest import mock diff --git a/tests/test_util_i18n.py b/tests/test_util_i18n.py index 3f4e8d52a..bf4bdbdc6 100644 --- a/tests/test_util_i18n.py +++ b/tests/test_util_i18n.py @@ -1,12 +1,4 @@ -""" - test_util_i18n - ~~~~~~~~~~~~~~ - - Test i18n util. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test i18n util.""" import datetime import os diff --git a/tests/test_util_images.py b/tests/test_util_images.py index e2c0c61f0..52fb5e990 100644 --- a/tests/test_util_images.py +++ b/tests/test_util_images.py @@ -1,12 +1,4 @@ -""" - test_util_images - ~~~~~~~~~~~~~~~~ - - Test images util. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test images util.""" import pytest diff --git a/tests/test_util_inspect.py b/tests/test_util_inspect.py index 589d522f3..5840e9d1e 100644 --- a/tests/test_util_inspect.py +++ b/tests/test_util_inspect.py @@ -1,12 +1,4 @@ -""" - test_util_inspect - ~~~~~~~~~~~~~~~ - - Tests util.inspect functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests util.inspect functions.""" import ast import datetime diff --git a/tests/test_util_inventory.py b/tests/test_util_inventory.py index 305ef4353..e79602330 100644 --- a/tests/test_util_inventory.py +++ b/tests/test_util_inventory.py @@ -1,12 +1,4 @@ -""" - test_util_inventory - ~~~~~~~~~~~~~~~~~~~ - - Test inventory util functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test inventory util functions.""" import posixpath import zlib diff --git a/tests/test_util_logging.py b/tests/test_util_logging.py index 3c78368d1..49cd2c11e 100644 --- a/tests/test_util_logging.py +++ b/tests/test_util_logging.py @@ -1,12 +1,4 @@ -""" - test_util_logging - ~~~~~~~~~~~~~~~~~ - - Test logging util. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test logging util.""" import codecs import os diff --git a/tests/test_util_matching.py b/tests/test_util_matching.py index 651546c92..ee1d3b2cb 100644 --- a/tests/test_util_matching.py +++ b/tests/test_util_matching.py @@ -1,12 +1,4 @@ -""" - test_util_matching - ~~~~~~~~~~~~~~~~~~ - - Tests sphinx.util.matching functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests sphinx.util.matching functions.""" from sphinx.util.matching import Matcher, compile_matchers diff --git a/tests/test_util_nodes.py b/tests/test_util_nodes.py index fe0a278e6..031569d4c 100644 --- a/tests/test_util_nodes.py +++ b/tests/test_util_nodes.py @@ -1,12 +1,4 @@ -""" - test_util_nodes - ~~~~~~~~~~~~~~~ - - Tests uti.nodes functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests uti.nodes functions.""" from textwrap import dedent from typing import Any diff --git a/tests/test_util_rst.py b/tests/test_util_rst.py index da3dba707..40a2ee68b 100644 --- a/tests/test_util_rst.py +++ b/tests/test_util_rst.py @@ -1,12 +1,4 @@ -""" - test_util_rst - ~~~~~~~~~~~~~~~ - - Tests sphinx.util.rst functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests sphinx.util.rst functions.""" from docutils.statemachine import StringList from jinja2 import Environment diff --git a/tests/test_util_template.py b/tests/test_util_template.py index 36f1dac35..4601179c1 100644 --- a/tests/test_util_template.py +++ b/tests/test_util_template.py @@ -1,12 +1,4 @@ -""" - test_util_template - ~~~~~~~~~~~~~~~~~~ - - Tests sphinx.util.template functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests sphinx.util.template functions.""" from sphinx.util.template import ReSTRenderer diff --git a/tests/test_util_typing.py b/tests/test_util_typing.py index 7d81fee5d..af2e5285b 100644 --- a/tests/test_util_typing.py +++ b/tests/test_util_typing.py @@ -1,12 +1,4 @@ -""" - test_util_typing - ~~~~~~~~~~~~~~~~ - - Tests util.typing functions. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Tests util.typing functions.""" import sys from numbers import Integral diff --git a/tests/test_versioning.py b/tests/test_versioning.py index 4de8331aa..107e21560 100644 --- a/tests/test_versioning.py +++ b/tests/test_versioning.py @@ -1,12 +1,4 @@ -""" - test_versioning - ~~~~~~~~~~~~~~~ - - Test the versioning implementation. - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the versioning implementation.""" import pickle diff --git a/tests/test_writer_latex.py b/tests/test_writer_latex.py index ccb578f3e..d51879949 100644 --- a/tests/test_writer_latex.py +++ b/tests/test_writer_latex.py @@ -1,12 +1,4 @@ -""" - test_writer_latex - ~~~~~~~~~~~~~~~~ - - Test the LaTeX writer - - :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""Test the LaTeX writer""" import pytest diff --git a/utils/checks.py b/utils/checks.py deleted file mode 100644 index 093817409..000000000 --- a/utils/checks.py +++ /dev/null @@ -1,108 +0,0 @@ -""" - utils.checks - ~~~~~~~~~~~~ - - Custom, Sphinx-only flake8 plugins. - - :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" - -import os -import re - -import sphinx - -name_mail_re = r'[\w ]+(<.*?>)?' -copyright_re = re.compile(r'^ :copyright: Copyright 200\d(-20\d\d)? ' - r'by %s(, %s)*[,.]$' % (name_mail_re, name_mail_re)) -copyright_2_re = re.compile(r'^ %s(, %s)*[,.]$' % - (name_mail_re, name_mail_re)) -license_re = re.compile(r' :license: (.*?).\n') - - -def flake8ext(_func): - """Decorate flake8_asserts functions""" - _func.name = _func.__name__ - _func.version = sphinx.__version__ - _func.code = _func.__name__.upper() - - return _func - - -@flake8ext -def sphinx_has_header(physical_line, filename, lines, line_number): - """Check for correct headers. - - Make sure each Python file has a correct file header including - copyright and license information. - - X101 invalid header found - """ - # we have a state machine of sorts so we need to start on line 1. Also, - # there's no point checking really short files - if line_number != 1 or len(lines) < 10: - return - - # this file uses a funky license but unfortunately it's not possible to - # ignore specific errors on a file-level basis yet [1]. Simply skip it. - # - # [1] https://gitlab.com/pycqa/flake8/issues/347 - if os.path.samefile(filename, './sphinx/util/smartypants.py'): - return - - # if the top-level package or not inside the package, ignore - mod_name = os.path.splitext(filename)[0].strip('./\\').replace( - '/', '.').replace('.__init__', '') - if mod_name == 'sphinx' or not mod_name.startswith('sphinx.'): - return - - # line number correction - offset = 1 - if lines[0:1] == ['#!/usr/bin/env python3\n']: - lines = lines[1:] - offset = 2 - - llist = [] - doc_open = False - - for lno, line in enumerate(lines): - llist.append(line) - if lno == 0: - if line != '"""\n' and line != 'r"""\n': - return 0, 'X101 missing docstring begin (""")' - else: - doc_open = True - elif doc_open: - if line == '"""\n': - # end of docstring - if lno <= 3: - return 0, 'X101 missing module name in docstring' - break - - if line != '\n' and line[:4] != ' ' and doc_open: - return 0, 'X101 missing correct docstring indentation' - - if lno == 1: - mod_name_len = len(line.strip()) - if line.strip() != mod_name: - return 2, 'X101 wrong module name in docstring heading' - elif lno == 2: - if line.strip() != mod_name_len * '~': - return (3, 'X101 wrong module name underline, should be ' - '~~~...~') - else: - return 0, 'X101 missing end and/or start of docstring...' - - # check for copyright and license fields - license = llist[-2:-1] - if not license or not license_re.match(license[0]): - return 0, 'X101 no correct license info' - - offset = -3 - copyright = llist[offset:offset + 1] - while copyright and copyright_2_re.match(copyright[0]): - offset -= 1 - copyright = llist[offset:offset + 1] - if not copyright or not copyright_re.match(copyright[0]): - return 0, 'X101 no correct copyright info' diff --git a/utils/doclinter.py b/utils/doclinter.py index b4b27748a..6ef8cbe10 100644 --- a/utils/doclinter.py +++ b/utils/doclinter.py @@ -1,12 +1,4 @@ -""" - utils.doclinter - ~~~~~~~~~~~~~~~ - - A linter for Sphinx docs - - :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. -""" +"""A linter for Sphinx docs""" import os import re diff --git a/utils/jssplitter_generator.py b/utils/jssplitter_generator.py index 7806d64d2..f0918ec3f 100644 --- a/utils/jssplitter_generator.py +++ b/utils/jssplitter_generator.py @@ -112,16 +112,9 @@ console.log(' ... ok\\n') ''' % js_src python_src = '''\ -""" - sphinx.search.jssplitter - ~~~~~~~~~~~~~~~~~~~~~~~~ - - Provides Python compatible word splitter to JavaScript - - DO NOT EDIT. This is generated by utils/jssplitter_generator.py +"""Provides Python compatible word splitter to JavaScript - :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. - :license: BSD, see LICENSE for details. +DO NOT EDIT. This is generated by utils/jssplitter_generator.py """ splitter_code = """ |