mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
docs: extensions: don't use utf-8 syntax for descriptions
None of the descriptions at the Sphinx extensions are using non-ascii characters, so no need to place them under u""" notation. Also, according with: https://docs.python.org/3/deprecations/pending-removal-in-3.16.html the 'u' format code is scheduled to be removed in Python 3.16. So, let's just use """. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Kees Cook <kees@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/8a42f6be53464af4b866492a7e9ddf29c0429997.1739254187.git.mchehab+huawei@kernel.org
This commit is contained in:
committed by
Jonathan Corbet
parent
5e25b972a2
commit
8def404249
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
# pylint: disable=W0141,C0113,C0103,C0325
|
||||
u"""
|
||||
"""
|
||||
cdomain
|
||||
~~~~~~~
|
||||
|
||||
@@ -145,7 +145,7 @@ class CObject(Base_CObject):
|
||||
}
|
||||
|
||||
def handle_func_like_macro(self, sig, signode):
|
||||
u"""Handles signatures of function-like macros.
|
||||
"""Handles signatures of function-like macros.
|
||||
|
||||
If the objtype is 'function' and the signature ``sig`` is a
|
||||
function-like macro, the name of the macro is returned. Otherwise
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# coding=utf-8
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
u"""
|
||||
"""
|
||||
kernel-abi
|
||||
~~~~~~~~~~
|
||||
|
||||
@@ -55,7 +55,7 @@ path = os.path.join(srctree, "Documentation/ABI")
|
||||
_kernel_abi = None
|
||||
|
||||
def get_kernel_abi():
|
||||
u"""
|
||||
"""
|
||||
Initialize kernel_abi global var, if not initialized yet.
|
||||
|
||||
This is needed to avoid warnings during Sphinx module initialization.
|
||||
@@ -81,7 +81,7 @@ def setup(app):
|
||||
|
||||
|
||||
class KernelCmd(Directive):
|
||||
u"""KernelABI (``kernel-abi``) directive"""
|
||||
"""KernelABI (``kernel-abi``) directive"""
|
||||
|
||||
required_arguments = 1
|
||||
optional_arguments = 3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# coding=utf-8
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
u"""
|
||||
"""
|
||||
kernel-feat
|
||||
~~~~~~~~~~~
|
||||
|
||||
@@ -56,7 +56,7 @@ def setup(app):
|
||||
|
||||
class KernelFeat(Directive):
|
||||
|
||||
u"""KernelFeat (``kernel-feat``) directive"""
|
||||
"""KernelFeat (``kernel-feat``) directive"""
|
||||
|
||||
required_arguments = 1
|
||||
optional_arguments = 2
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
# pylint: disable=R0903, C0330, R0914, R0912, E0401
|
||||
|
||||
u"""
|
||||
"""
|
||||
kernel-include
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
@@ -56,7 +56,7 @@ def setup(app):
|
||||
class KernelInclude(Include):
|
||||
# ==============================================================================
|
||||
|
||||
u"""KernelInclude (``kernel-include``) directive"""
|
||||
"""KernelInclude (``kernel-include``) directive"""
|
||||
|
||||
def run(self):
|
||||
env = self.state.document.settings.env
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
# pylint: disable=C0103, R0903, R0912, R0915
|
||||
u"""
|
||||
"""
|
||||
scalable figure and image handling
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -165,7 +165,7 @@ def setup(app):
|
||||
|
||||
|
||||
def setupTools(app):
|
||||
u"""
|
||||
"""
|
||||
Check available build tools and log some *verbose* messages.
|
||||
|
||||
This function is called once, when the builder is initiated.
|
||||
@@ -445,7 +445,7 @@ class kernel_image(nodes.image):
|
||||
pass
|
||||
|
||||
class KernelImage(images.Image):
|
||||
u"""KernelImage directive
|
||||
"""KernelImage directive
|
||||
|
||||
Earns everything from ``.. image::`` directive, except *remote URI* and
|
||||
*glob* pattern. The KernelImage wraps a image node into a
|
||||
@@ -481,7 +481,7 @@ class kernel_figure(nodes.figure):
|
||||
"""Node for ``kernel-figure`` directive."""
|
||||
|
||||
class KernelFigure(Figure):
|
||||
u"""KernelImage directive
|
||||
"""KernelImage directive
|
||||
|
||||
Earns everything from ``.. figure::`` directive, except *remote URI* and
|
||||
*glob* pattern. The KernelFigure wraps a figure node into a kernel_figure
|
||||
@@ -557,7 +557,7 @@ class kernel_render(nodes.General, nodes.Inline, nodes.Element):
|
||||
pass
|
||||
|
||||
class KernelRender(Figure):
|
||||
u"""KernelRender directive
|
||||
"""KernelRender directive
|
||||
|
||||
Render content by external tool. Has all the options known from the
|
||||
*figure* directive, plus option ``caption``. If ``caption`` has a
|
||||
|
||||
@@ -9,7 +9,7 @@ from sphinx.util.osutil import fs_encoding
|
||||
def loadConfig(namespace):
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
u"""Load an additional configuration file into *namespace*.
|
||||
"""Load an additional configuration file into *namespace*.
|
||||
|
||||
The name of the configuration file is taken from the environment
|
||||
``SPHINX_CONF``. The external configuration file extends (or overwrites) the
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
# pylint: disable=R0903, C0330, R0914, R0912, E0401
|
||||
|
||||
u"""
|
||||
"""
|
||||
maintainers-include
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -37,7 +37,7 @@ def setup(app):
|
||||
)
|
||||
|
||||
class MaintainersInclude(Include):
|
||||
u"""MaintainersInclude (``maintainers-include``) directive"""
|
||||
"""MaintainersInclude (``maintainers-include``) directive"""
|
||||
required_arguments = 0
|
||||
|
||||
def parse_maintainers(self, path):
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# -*- coding: utf-8; mode: python -*-
|
||||
# pylint: disable=C0330, R0903, R0912
|
||||
|
||||
u"""
|
||||
"""
|
||||
flat-table
|
||||
~~~~~~~~~~
|
||||
|
||||
@@ -99,7 +99,7 @@ class colSpan(nodes.General, nodes.Element): pass # pylint: disable=C0103,C0321
|
||||
class FlatTable(Table):
|
||||
# ==============================================================================
|
||||
|
||||
u"""FlatTable (``flat-table``) directive"""
|
||||
"""FlatTable (``flat-table``) directive"""
|
||||
|
||||
option_spec = {
|
||||
'name': directives.unchanged
|
||||
@@ -135,7 +135,7 @@ class FlatTable(Table):
|
||||
class ListTableBuilder(object):
|
||||
# ==============================================================================
|
||||
|
||||
u"""Builds a table from a double-stage list"""
|
||||
"""Builds a table from a double-stage list"""
|
||||
|
||||
def __init__(self, directive):
|
||||
self.directive = directive
|
||||
@@ -212,7 +212,7 @@ class ListTableBuilder(object):
|
||||
raise SystemMessagePropagation(error)
|
||||
|
||||
def parseFlatTableNode(self, node):
|
||||
u"""parses the node from a :py:class:`FlatTable` directive's body"""
|
||||
"""parses the node from a :py:class:`FlatTable` directive's body"""
|
||||
|
||||
if len(node) != 1 or not isinstance(node[0], nodes.bullet_list):
|
||||
self.raiseError(
|
||||
@@ -225,7 +225,7 @@ class ListTableBuilder(object):
|
||||
self.roundOffTableDefinition()
|
||||
|
||||
def roundOffTableDefinition(self):
|
||||
u"""Round off the table definition.
|
||||
"""Round off the table definition.
|
||||
|
||||
This method rounds off the table definition in :py:member:`rows`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user