diff --git a/LICENSE b/LICENSE index 021d9dbdc29..05bf4ab2db2 100644 --- a/LICENSE +++ b/LICENSE @@ -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. diff --git a/setup.cfg b/setup.cfg index 14b071a9ec0..14ca195252f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 8106e63bf74..6a2bcb25b07 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 daff054418a..887bb6ae1f2 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 af1c8fff2d8..bf74bd1aaaa 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 fd8b65b6ef6..53bcc552af2 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 b61cd026dcb..e1817c445da 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 3b18917691f..26efdc1fb64 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 a80e53d9aaf..3a1f5bd6569 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 82af09be178..bf8af15bbd6 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 cddf8e7b869..f4f1356f651 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 b1a3f520e98..013955ed1bb 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 f9dac2891ef..e8bc547b77f 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 9f9c17b3de7..bbd3b91e061 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 ea1d69d12c3..ea596cb4b22 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 d7156b796b8..fb33007f13b 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 25caf17360e..ace60864459 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 95b5211f57b..2c008b9a749 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 b2e3a4dff9f..69f8493818f 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 621c6a7cf45..5e478f5c4c4 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 6b797c9a248..6883829c56d 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 4f760b8bc09..a9457248452 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 c942cfa8666..43637b65a6d 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 09db8d2b933..d177474a66a 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 f07cd2516c8..24a19b0df05 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 6363e11a0a1..bcd4798645e 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 c4e066089fc..0f45b912c6d 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 d77014547f0..4d277c5eae2 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 8de24a364f0..00a06762a8e 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 cad0eeabb27..b8f3d33e19b 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 01e7e3b167e..e8b446d40b6 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 37ca06e1dc8..50de07b72b9 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 5b95f8b99c9..5661c535d14 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 90658a904ea..0e5cc0c60a9 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 ddd47e1f838..dc44ed31485 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 a14b6e801e3..83cbb67073a 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 d76bb74c702..a01d783324e 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 4252baf6553..f422b8b74bb 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 5181afb1720..176a1def19a 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 9db59897527..31fa4402074 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 f98abc4d10a..39e63b659b1 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 311885e5dbe..64985a37fd6 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 7dbc1bb5aaf..8c630c8f5bb 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 2095d1d1008..ab16cdd8568 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 7f66a473846..6df7d30cbea 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 145b62eda8c..f55d76ba094 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 0899e02f801..f861ecad1c2 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 e9f75325a33..11a3260b75f 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 9dde7b407d8..b5b13524122 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 168bd6ba6b5..1566aecba24 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 af5f79e9631..57fdc91f14d 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 d13c24042dd..49881b76d2b 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 962e731435a..631060e75a6 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 ba7c206367f..6f12c13234c 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 9530b3bd94d..6bb922c6669 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 4138c4c1543..87f7c29f2b8 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 3165b038997..c70a5d408fc 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 8c285f3239c..10c5560fdc1 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 ddc7a0417b5..75c981f3cb1 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 c90dd10d00d..a0263c613fd 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 46cea6827d8..5302cd00597 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 803691ca3a7..16170d4cf5e 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 07339d6e66e..68afc83b8d1 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.). +"""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.). - :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 a6d36f61fdc..9bea15866f7 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 22c9f46b6f2..7eede8eeb94 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 0c040e1ef36..2eb25536d4b 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 b1bf28ec887..9d5902d2fdf 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 7bd0b1ea017..f9e14a0cd05 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 8ce16b37a50..313fe55018f 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 95ba6f6b72e..9881ae747b0 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 6acd99e46ca..2b5ceb4a6f3 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 e8efcb076c3..ff2f695ec88 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 74804df4af7..e610afc5cf4 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 23686563075..798c91e4c03 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 2a7e08f8baf..3ebd095c2ae 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 490516d63f5..0c02547e9f2 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 b6570347228..94fd9077ac6 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 8caba884298..4b476ec0a26 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 `. +- 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 `. - :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 0ea25ba521d..e250fb2f27b 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 ad248993d52..b4a69a0f24f 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 50a2b203f82..bffaa49ff7c 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 5a1653037a0..a40b6c46a32 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 189bf878672..2c908daab58 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 cf4626c0b78..c8a3dc763f7 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 2f8ab2588e7..64e296c39d6 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 6ae8284084d..ad7abd31b15 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 7b85799ec09..d0d360e2e5e 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 `_ 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 7f86b174597..d0dfaf82549 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 9b9834cfad1..a1142453737 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 f4d4c2423d2..9459ad4a6f7 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 3b8ba19247f..c0d034087c8 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 54274ac04a2..5aff7c67d45 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 890a5d8a783..356b4ab9d1e 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 200f41b336b..a7e5e494061 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 b52ce094f77..936631d517a 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 525a4a994c3..a0d1f65ea1e 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 5378da0a351..b9bdff0f9c7 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 3204c0a1bd1..b044f983bd9 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 156a08578e2..1340558665f 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 681bfa38b85..5f386d62fb8 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 9e1d23cccad..755116475d6 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 5034fe9d54e..ff1135c25c1 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 d81aa2879ae..ffc7f7f0b04 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 76c30b90539..0f80109560c 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 09cfac9c76d..5e467937b05 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 28f3ea036e9..5fa35ae161f 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 6ef91b86f22..42559ad93db 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 58ea6942c93..3896629def9 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 81ff1ae80ff..53cd917dc7f 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 137a0906304..7aba54bfdf2 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 313ddd15833..36f7e7747e8 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 eea1fb50744..a469bc9224b 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 365439d9208..23f7d85bbf4 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 da042820f8b..80b3b3a6dd8 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 1d5ebb6059d..38520edc338 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 4403347eda6..babdb8e47c9 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 744c7f5d827..b5c549f66a2 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 bff65537fe9..f11f3cf1599 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 41c2e60044b..1708928b20f 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 3736142d225..4c8a2271171 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 b3c2990be34..6c4f8da94b9 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 29d2764efa3..176cc8da42b 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 86075291c68..78d48aed0d7 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 0daa4af2ae1..700c2683f72 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 67b89f1c89c..19f2375c883 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 """ import os diff --git a/sphinx/testing/__init__.py b/sphinx/testing/__init__.py index c28c0ce0adb..1cf074ff151 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 395fe1f74a6..09e8364bd91 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 317933ee7b4..0b558e32c1a 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 ef3b5c7d0ba..404213ecc7a 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 59dcd37aa7c..9deabb74aae 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 d062612cbb8..441e6da3b68 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 819cec377cd..6b8f79c3da8 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 26e075a7a31..a2a59222144 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 e39ac97d1c7..4bf63323787 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 fb2824fe05e..4909cebc1db 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 df2eeecbb6a..94a162963b0 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 55bd56c2efd..3c3f5432892 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 1a6d4f6d5cd..ac9c4225e27 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 82e8043bbef..647c83e127f 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 154bd60c1f1..ee98c29c8ac 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 b8221e5d5de..7f80aa576b0 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 dd2bde03274..e751ae9bb6e 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 ae481de9b13..7f332fda709 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 48b5662836c..cc22390a5f4 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 a599c66a7f1..7a2f802c5ac 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 620edf8c7f3..11c823b3303 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 5ab7666496d..654a7a98bbf 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 c46a81cb6d9..f706fa69a21 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 511a9abee97..f3bb002a37b 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 12a25379166..2def252f49a 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 06920288f94..5b4e2586eba 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 a208affec4e..7827aec7494 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 7db70dd5c41..ed5aea4ba10 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 7294885b5e1..37fa672afbf 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 a89acf9a8b0..53a8933386c 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 6648596246d..7caf662dcf5 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 c16142a2cd1..4abc3afa46e 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 4f69b4f3842..1af722fdce2 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 3f348a8b531..e4bd852b05d 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 c40f653e6de..cb7ee8be4fb 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 2b9b67be958..aedbd143d18 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 581efbfd586..b1bcb6bd347 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 320efa6180f..b44cf984819 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 05d3b03bf22..bc417163160 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 65ef043509e..ff6c365c74d 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 52ca31e0c99..c4f89eb9539 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 . - :license: Public Domain ("can be used free of charge for any purpose"). +:author: Vivake Gupta . +: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 67c023643e7..89276732df8 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 5d5de52beee..5a73515b36e 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 7efbb29ae04..83c78bb3857 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 f47788005c6..1534b2c8ee5 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 1a615101df9..06cf33cc069 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 0f8451bc9f8..e90088e6d40 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 34b73a0a5c3..49a4b034948 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 b9d0f648c94..43d403e6d4d 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 5afc5fca766..1800a8bd317 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 0344d82e9fc..10e91f4a3ec 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 7913972a932..b40f032b4bb 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 9fef050c1ce..8df01012ce8 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 f9fb2278486..5f9aad7fa22 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 dd1a04513e0..ebbc9e2c7f6 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 0a4676d8950..bb55b0fc2bd 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 a421f53fe73..b3093a7f440 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 1e732aab5e7..89289fe44fc 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 dd721355b24..aad5a2ccce6 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 fc85f193d28..365fff8ea55 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 76de332ee12..f2af1956537 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 65307ba924b..a4a07619b85 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 a7a90623c17..25598f7951f 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 851e8ac9dd4..4ba29df85f8 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 9398dfe5f16..6d80324bda9 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 7688f76b309..f50f72a9c9c 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 b0ae854230a..938e8a820c9 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 358db6a4e32..d5684ba6cc2 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 1a14c9bf757..c6139c2bfdd 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 601de15874e..ccdbd9bd309 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 c080d2ad294..0578e425e1a 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 4927e5d1d9f..c866a972030 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 319e6a07dae..74aa7077a95 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 97e911eb5cd..7981dd7a9da 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 bcb21703605..3855df9135d 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 5f519d3b924..98a9aa89940 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 164220e334b..2e9ea634cbe 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 e1858f4e06a..f221db07578 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 a199a89db52..f4eb8f9db0a 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 7e47c9ab32e..def6cb67d92 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 f69008b8f4b..16a71d9fe59 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 389f77f7c83..72ffc474d8a 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 b109fe4d81e..465fef328cd 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 de544d25dc8..4205ada135b 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 b79431d49e2..df19ffdb2f9 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 00e7361a394..e92030517c7 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 d8eec2c05c1..7ffca7898e0 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 f32592f9f6e..5b7678499cc 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 dc5a184a4cf..588bcac18be 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 44b0526d1f6..f36c86a87c1 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 44c3308fed3..7aba847a397 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 62bbf83d0f2..3cbfe2eea1b 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 fec4da4632f..ec48f08b398 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 e68c72a586a..508e6378229 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 7d6d9eb30b7..e8c14d27afa 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 6489626d2fc..55a30830027 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 05a73ac8179..6b356e5842e 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 4b62165e31c..3d50020b371 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 c5a1ab8f6ad..070eafe7522 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 6a71054c257..91e1d27d20b 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 c207c82fcef..0f3288c2812 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 a7a24e026a9..563bfe35b8f 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 f685f774c8f..bdb9478215c 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 ccbc9ed7701..7345ca3ffd4 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 13da15e503f..fd77db816b8 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 6d6fbcf1d30..ee179a86b30 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 3a527acb2b7..6e8a4123e5e 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 b16cbc4f436..4fa4dfc3032 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 9d87b021278..445719e1207 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 15eaf6050eb..7ffe7ead24a 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 f8f89714973..3c4651b3f3e 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 b4dbf125bf2..134947c8743 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 bd563b4fc8b..a6218ecccd2 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 b2ad8afe52f..7d52ff95eb5 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 5dd7139614c..e3345e6270f 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 250fdae26fb..a1b98996f77 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 21278dbcac3..ed97b63518c 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 95c2778e898..6b80af6bf68 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 3bc2abadf4b..ffe8bd99516 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 140b2a72856..c2e1954281d 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 4e7fffffa7f..d74743cca21 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 d83f2f1cceb..92276a21c45 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 62dbb13528c..44740f67d81 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 c5765ccdf20..1dcad64eb94 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 dbd0f0272c9..39ad62784b3 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 a2e26a42bc6..7f3199705e3 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 cbe9a61df8a..86163c6ad3d 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 dc7f1d35d3e..40db85ef312 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 312c0245d68..1f9882eb981 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 0de03d5ea94..6143105eb71 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 11e47a86bed..5d2496ba568 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 0f317c5a80d..1ea85b19be6 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 a7e93637632..67a13c8ef1b 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 4c74ac24a50..024e6941c90 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 0a1176ae654..054912feb59 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 bd821616782..6cfb716e497 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 37e280c3b45..7a6f1f00464 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 60dd72cdfed..21382d84b8f 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 33e73c98cc2..e1afa4bb963 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 fe0a7b06b2a..e5ec8ad14c9 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 11369d2ba90..2715eb5a587 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 0023bbcdba8..e93e6586c3f 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 73f155cf38d..813e84e975e 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 9a7a05e4908..41022dd99fd 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 4d6edd0cee3..27f95e644c0 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 3f4e8d52a80..bf4bdbdc6e5 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 e2c0c61f0cf..52fb5e990ec 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 589d522f374..5840e9d1ec2 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 305ef4353bf..e7960233001 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 3c78368d16c..49cd2c11e0c 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 651546c9230..ee1d3b2cb62 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 fe0a278e695..031569d4ce8 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 da3dba70709..40a2ee68b5a 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 36f1dac3501..4601179c1d6 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 7d81fee5d7b..af2e5285bfd 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 4de8331aae7..107e215604d 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 ccb578f3e50..d51879949d3 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 09381740979..00000000000 --- 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 b4b27748a33..6ef8cbe10a7 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 7806d64d292..f0918ec3f79 100644 --- a/utils/jssplitter_generator.py +++ b/utils/jssplitter_generator.py @@ -112,16 +112,9 @@ def fold(jsonData, splitter): ''' % 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 = """