summaryrefslogtreecommitdiff
path: root/sphinx/util
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2022-03-14 02:14:17 +0900
committerGitHub <noreply@github.com>2022-03-14 02:14:17 +0900
commitb12b39db05d605cfb946f84afd27e0f6cf3c9e13 (patch)
tree6112096526671e25db77c5fd778ab9acfe818e38 /sphinx/util
parent856b182b31eb35d1ede373eca91d7496f141a00d (diff)
parentf05a068be980b7f237135596c9414e4737052681 (diff)
downloadsphinx-git-b12b39db05d605cfb946f84afd27e0f6cf3c9e13.tar.gz
Merge pull request #10212 from AA-Turner/remove-module-docstring-titles
Remove module docstring titles
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/__init__.py10
-rw-r--r--sphinx/util/build_phase.py10
-rw-r--r--sphinx/util/cfamily.py10
-rw-r--r--sphinx/util/compat.py10
-rw-r--r--sphinx/util/console.py10
-rw-r--r--sphinx/util/docfields.py11
-rw-r--r--sphinx/util/docstrings.py10
-rw-r--r--sphinx/util/docutils.py10
-rw-r--r--sphinx/util/fileutil.py10
-rw-r--r--sphinx/util/i18n.py10
-rw-r--r--sphinx/util/images.py10
-rw-r--r--sphinx/util/inspect.py10
-rw-r--r--sphinx/util/inventory.py10
-rw-r--r--sphinx/util/jsdump.py10
-rw-r--r--sphinx/util/logging.py10
-rw-r--r--sphinx/util/matching.py10
-rw-r--r--sphinx/util/math.py10
-rw-r--r--sphinx/util/nodes.py10
-rw-r--r--sphinx/util/osutil.py10
-rw-r--r--sphinx/util/parallel.py10
-rw-r--r--sphinx/util/png.py10
-rw-r--r--sphinx/util/pycompat.py10
-rw-r--r--sphinx/util/requests.py10
-rw-r--r--sphinx/util/rst.py10
-rw-r--r--sphinx/util/smartypants.py36
-rw-r--r--sphinx/util/stemmer/__init__.py10
-rw-r--r--sphinx/util/stemmer/porter.py36
-rw-r--r--sphinx/util/tags.py8
-rw-r--r--sphinx/util/template.py10
-rw-r--r--sphinx/util/texescape.py10
-rw-r--r--sphinx/util/typing.py10
31 files changed, 64 insertions, 297 deletions
diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py
index 154bd60c1..ee98c29c8 100644
--- a/sphinx/util/__init__.py
+++ b/sphinx/util/__init__.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util
- ~~~~~~~~~~~
-
- Utility functions for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Utility functions for Sphinx."""
import functools
import hashlib
diff --git a/sphinx/util/build_phase.py b/sphinx/util/build_phase.py
index b8221e5d5..7f80aa576 100644
--- a/sphinx/util/build_phase.py
+++ b/sphinx/util/build_phase.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.build_phase
- ~~~~~~~~~~~~~~~~~~~~~~~
-
- Build phase of Sphinx application.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Build phase of Sphinx application."""
from enum import IntEnum
diff --git a/sphinx/util/cfamily.py b/sphinx/util/cfamily.py
index dd2bde032..e751ae9bb 100644
--- a/sphinx/util/cfamily.py
+++ b/sphinx/util/cfamily.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.cfamily
- ~~~~~~~~~~~~~~~~~~~
-
- Utility functions common to the C and C++ domains.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Utility functions common to the C and C++ domains."""
import re
from copy import deepcopy
diff --git a/sphinx/util/compat.py b/sphinx/util/compat.py
index ae481de9b..7f332fda7 100644
--- a/sphinx/util/compat.py
+++ b/sphinx/util/compat.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.compat
- ~~~~~~~~~~~~~~~~~~
-
- modules for backward compatibility
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""modules for backward compatibility"""
import sys
from typing import TYPE_CHECKING, Any, Dict
diff --git a/sphinx/util/console.py b/sphinx/util/console.py
index 48b566283..cc22390a5 100644
--- a/sphinx/util/console.py
+++ b/sphinx/util/console.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.console
- ~~~~~~~~~~~~~~~~~~~
-
- Format colored console output.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Format colored console output."""
import os
import re
diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py
index a599c66a7..7a2f802c5 100644
--- a/sphinx/util/docfields.py
+++ b/sphinx/util/docfields.py
@@ -1,12 +1,7 @@
-"""
- sphinx.util.docfields
- ~~~~~~~~~~~~~~~~~~~~~
-
- "Doc fields" are reST field lists in object descriptions that will
- be domain-specifically transformed to a more appealing presentation.
+"""Utility code for "Doc fields".
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
+"Doc fields" are reST field lists in object descriptions that will
+be domain-specifically transformed to a more appealing presentation.
"""
from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Type, Union, cast
diff --git a/sphinx/util/docstrings.py b/sphinx/util/docstrings.py
index 620edf8c7..11c823b33 100644
--- a/sphinx/util/docstrings.py
+++ b/sphinx/util/docstrings.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.docstrings
- ~~~~~~~~~~~~~~~~~~~~~~
-
- Utilities for docstring processing.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Utilities for docstring processing."""
import re
import sys
diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py
index 5ab766649..654a7a98b 100644
--- a/sphinx/util/docutils.py
+++ b/sphinx/util/docutils.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.docutils
- ~~~~~~~~~~~~~~~~~~~~
-
- Utility functions for docutils.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Utility functions for docutils."""
import os
import re
diff --git a/sphinx/util/fileutil.py b/sphinx/util/fileutil.py
index c46a81cb6..f706fa69a 100644
--- a/sphinx/util/fileutil.py
+++ b/sphinx/util/fileutil.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.fileutil
- ~~~~~~~~~~~~~~~~~~~~
-
- File utility functions for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""File utility functions for Sphinx."""
import os
import posixpath
diff --git a/sphinx/util/i18n.py b/sphinx/util/i18n.py
index 511a9abee..f3bb002a3 100644
--- a/sphinx/util/i18n.py
+++ b/sphinx/util/i18n.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.i18n
- ~~~~~~~~~~~~~~~~
-
- Builder superclass for all builders.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Builder superclass for all builders."""
import os
import re
diff --git a/sphinx/util/images.py b/sphinx/util/images.py
index 12a253791..2def252f4 100644
--- a/sphinx/util/images.py
+++ b/sphinx/util/images.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.images
- ~~~~~~~~~~~~~~~~~~
-
- Image utility functions for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Image utility functions for Sphinx."""
import base64
import imghdr
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py
index 06920288f..5b4e2586e 100644
--- a/sphinx/util/inspect.py
+++ b/sphinx/util/inspect.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.inspect
- ~~~~~~~~~~~~~~~~~~~
-
- Helpers for inspecting Python modules.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Helpers for inspecting Python modules."""
import builtins
import contextlib
diff --git a/sphinx/util/inventory.py b/sphinx/util/inventory.py
index a208affec..7827aec74 100644
--- a/sphinx/util/inventory.py
+++ b/sphinx/util/inventory.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.inventory
- ~~~~~~~~~~~~~~~~~~~~~
-
- Inventory utility functions for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Inventory utility functions for Sphinx."""
import os
import re
import zlib
diff --git a/sphinx/util/jsdump.py b/sphinx/util/jsdump.py
index 7db70dd5c..ed5aea4ba 100644
--- a/sphinx/util/jsdump.py
+++ b/sphinx/util/jsdump.py
@@ -1,12 +1,6 @@
-"""
- sphinx.util.jsdump
- ~~~~~~~~~~~~~~~~~~
-
- This module implements a simple JavaScript serializer.
- Uses the basestring encode function from simplejson by Bob Ippolito.
+"""This module implements a simple JavaScript serializer.
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
+Uses the basestring encode function from simplejson by Bob Ippolito.
"""
import re
diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py
index 7294885b5..37fa672af 100644
--- a/sphinx/util/logging.py
+++ b/sphinx/util/logging.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.logging
- ~~~~~~~~~~~~~~~~~~~
-
- Logging utility functions for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Logging utility functions for Sphinx."""
import logging
import logging.handlers
diff --git a/sphinx/util/matching.py b/sphinx/util/matching.py
index a89acf9a8..53a893338 100644
--- a/sphinx/util/matching.py
+++ b/sphinx/util/matching.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.matching
- ~~~~~~~~~~~~~~~~~~~~
-
- Pattern-matching utility functions for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Pattern-matching utility functions for Sphinx."""
import re
from typing import Callable, Dict, Iterable, List, Match, Optional, Pattern
diff --git a/sphinx/util/math.py b/sphinx/util/math.py
index 664859624..7caf662dc 100644
--- a/sphinx/util/math.py
+++ b/sphinx/util/math.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.math
- ~~~~~~~~~~~~~~~~
-
- Utility functions for math.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Utility functions for math."""
from docutils import nodes
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py
index c16142a2c..4abc3afa4 100644
--- a/sphinx/util/nodes.py
+++ b/sphinx/util/nodes.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.nodes
- ~~~~~~~~~~~~~~~~~
-
- Docutils node-related utility functions for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Docutils node-related utility functions for Sphinx."""
import re
import unicodedata
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index 4f69b4f38..1af722fdc 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.osutil
- ~~~~~~~~~~~~~~~~~~
-
- Operating system-related utility functions for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Operating system-related utility functions for Sphinx."""
import contextlib
import filecmp
diff --git a/sphinx/util/parallel.py b/sphinx/util/parallel.py
index 3f348a8b5..e4bd852b0 100644
--- a/sphinx/util/parallel.py
+++ b/sphinx/util/parallel.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.parallel
- ~~~~~~~~~~~~~~~~~~~~
-
- Parallel building utilities.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Parallel building utilities."""
import os
import time
diff --git a/sphinx/util/png.py b/sphinx/util/png.py
index c40f653e6..cb7ee8be4 100644
--- a/sphinx/util/png.py
+++ b/sphinx/util/png.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.png
- ~~~~~~~~~~~~~~~
-
- PNG image manipulation helpers.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""PNG image manipulation helpers."""
import binascii
import struct
diff --git a/sphinx/util/pycompat.py b/sphinx/util/pycompat.py
index 2b9b67be9..aedbd143d 100644
--- a/sphinx/util/pycompat.py
+++ b/sphinx/util/pycompat.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.pycompat
- ~~~~~~~~~~~~~~~~~~~~
-
- Stuff for Python version compatibility.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Stuff for Python version compatibility."""
import warnings
from typing import Any, Callable
diff --git a/sphinx/util/requests.py b/sphinx/util/requests.py
index 581efbfd5..b1bcb6bd3 100644
--- a/sphinx/util/requests.py
+++ b/sphinx/util/requests.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.requests
- ~~~~~~~~~~~~~~~~~~~~
-
- Simple requests package loader
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Simple requests package loader"""
import sys
import warnings
diff --git a/sphinx/util/rst.py b/sphinx/util/rst.py
index 320efa618..b44cf9848 100644
--- a/sphinx/util/rst.py
+++ b/sphinx/util/rst.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.rst
- ~~~~~~~~~~~~~~~
-
- reST helper functions.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""reST helper functions."""
import re
from collections import defaultdict
diff --git a/sphinx/util/smartypants.py b/sphinx/util/smartypants.py
index 05d3b03bf..bc4171631 100644
--- a/sphinx/util/smartypants.py
+++ b/sphinx/util/smartypants.py
@@ -1,27 +1,25 @@
-"""
- sphinx.util.smartypants
- ~~~~~~~~~~~~~~~~~~~~~~~
+"""Deprecated backport of docutils.utils.smartquotes.
- This is extracted (with minor adaptations for flake8 compliance) from
- docutils’ docutils/utils/smartquotes.py as of revision 8097 (30 May 2017),
- in order to backport for Sphinx usage with Docutils < 0.14 extra language
- configurations and fixes. Replaces earlier smartypants version as used up
- to Sphinx 1.5.6.
+This is extracted (with minor adaptations for flake8 compliance) from
+docutils’ docutils/utils/smartquotes.py as of revision 8097 (30 May 2017),
+in order to backport for Sphinx usage with Docutils < 0.14 extra language
+configurations and fixes. Replaces earlier smartypants version as used up
+to Sphinx 1.5.6.
- :copyright: © 2010 Günter Milde,
- original `SmartyPants`_: © 2003 John Gruber
- smartypants.py: © 2004, 2007 Chad Miller
- :license: Released under the terms of the `2-Clause BSD license`_, in short:
+:copyright: © 2010 Günter Milde,
+ original `SmartyPants`_: © 2003 John Gruber
+ smartypants.py: © 2004, 2007 Chad Miller
+:license: Released under the terms of the `2-Clause BSD license`_, in short:
- Copying and distribution of this file, with or without modification,
- are permitted in any medium without royalty provided the copyright
- notices and this notice are preserved.
- This file is offered as-is, without any warranty.
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notices and this notice are preserved.
+ This file is offered as-is, without any warranty.
- .. _SmartyPants: https://daringfireball.net/projects/smartypants/
- .. _2-Clause BSD license: https://spdx.org/licenses/BSD-2-Clause
+.. _SmartyPants: https://daringfireball.net/projects/smartypants/
+.. _2-Clause BSD license: https://spdx.org/licenses/BSD-2-Clause
- See the LICENSE file and the original docutils code for details.
+See the LICENSE file and the original docutils code for details.
"""
diff --git a/sphinx/util/stemmer/__init__.py b/sphinx/util/stemmer/__init__.py
index 65ef04350..ff6c365c7 100644
--- a/sphinx/util/stemmer/__init__.py
+++ b/sphinx/util/stemmer/__init__.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.stemmer
- ~~~~~~~~~~~~~~~~~~~
-
- Word stemming utilities for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Word stemming utilities for Sphinx."""
from sphinx.util.stemmer.porter import PorterStemmer
diff --git a/sphinx/util/stemmer/porter.py b/sphinx/util/stemmer/porter.py
index 52ca31e0c..c4f89eb95 100644
--- a/sphinx/util/stemmer/porter.py
+++ b/sphinx/util/stemmer/porter.py
@@ -1,30 +1,26 @@
-"""
- sphinx.util.stemmer.porter
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Porter Stemming Algorithm
+"""Porter Stemming Algorithm
- This is the Porter stemming algorithm, ported to Python from the
- version coded up in ANSI C by the author. It may be be regarded
- as canonical, in that it follows the algorithm presented in
+This is the Porter stemming algorithm, ported to Python from the
+version coded up in ANSI C by the author. It may be be regarded
+as canonical, in that it follows the algorithm presented in
- Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
- no. 3, pp 130-137,
+Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
+no. 3, pp 130-137,
- only differing from it at the points made --DEPARTURE-- below.
+only differing from it at the points made --DEPARTURE-- below.
- See also https://tartarus.org/martin/PorterStemmer/
+See also https://tartarus.org/martin/PorterStemmer/
- The algorithm as described in the paper could be exactly replicated
- by adjusting the points of DEPARTURE, but this is barely necessary,
- because (a) the points of DEPARTURE are definitely improvements, and
- (b) no encoding of the Porter stemmer I have seen is anything like
- as exact as this version, even with the points of DEPARTURE!
+The algorithm as described in the paper could be exactly replicated
+by adjusting the points of DEPARTURE, but this is barely necessary,
+because (a) the points of DEPARTURE are definitely improvements, and
+(b) no encoding of the Porter stemmer I have seen is anything like
+as exact as this version, even with the points of DEPARTURE!
- Release 1: January 2001
+Release 1: January 2001
- :copyright: Copyright 2001 by Vivake Gupta <v@nano.com>.
- :license: Public Domain ("can be used free of charge for any purpose").
+:author: Vivake Gupta <v@nano.com>.
+:license: Public Domain ("can be used free of charge for any purpose").
"""
diff --git a/sphinx/util/tags.py b/sphinx/util/tags.py
index 67c023643..89276732d 100644
--- a/sphinx/util/tags.py
+++ b/sphinx/util/tags.py
@@ -1,11 +1,3 @@
-"""
- sphinx.util.tags
- ~~~~~~~~~~~~~~~~
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
-
from typing import Iterator, List
from jinja2 import nodes
diff --git a/sphinx/util/template.py b/sphinx/util/template.py
index 5d5de52be..5a73515b3 100644
--- a/sphinx/util/template.py
+++ b/sphinx/util/template.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.template
- ~~~~~~~~~~~~~~~~~~~~
-
- Templates utility functions for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""Templates utility functions for Sphinx."""
import os
from functools import partial
diff --git a/sphinx/util/texescape.py b/sphinx/util/texescape.py
index 7efbb29ae..83c78bb38 100644
--- a/sphinx/util/texescape.py
+++ b/sphinx/util/texescape.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.texescape
- ~~~~~~~~~~~~~~~~~~~~~
-
- TeX escaping helper.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""TeX escaping helper."""
import re
from typing import Dict
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py
index f47788005..1534b2c8e 100644
--- a/sphinx/util/typing.py
+++ b/sphinx/util/typing.py
@@ -1,12 +1,4 @@
-"""
- sphinx.util.typing
- ~~~~~~~~~~~~~~~~~~
-
- The composite types for Sphinx.
-
- :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
+"""The composite types for Sphinx."""
import sys
import typing