Commit 8def4042 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet
Browse files

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: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: default avatarKees Cook <kees@kernel.org>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/8a42f6be53464af4b866492a7e9ddf29c0429997.1739254187.git.mchehab+huawei@kernel.org
parent 5e25b972
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
# -*- 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
+3 −3
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
# 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 −2
Original line number Diff line number Diff line
@@ -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
+5 −5
Original line number Diff line number Diff line
# -*- 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
Loading