Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
8def4042 5e25b972

+22 -22
+2 -2
Documentation/sphinx/cdomain.py
··· 1 1 # -*- coding: utf-8; mode: python -*- 2 2 # pylint: disable=W0141,C0113,C0103,C0325 3 - u""" 3 + """ 4 4 cdomain 5 5 ~~~~~~~ 6 6 ··· 145 145 } 146 146 147 147 def handle_func_like_macro(self, sig, signode): 148 - u"""Handles signatures of function-like macros. 148 + """Handles signatures of function-like macros. 149 149 150 150 If the objtype is 'function' and the signature ``sig`` is a 151 151 function-like macro, the name of the macro is returned. Otherwise
+3 -3
Documentation/sphinx/kernel_abi.py
··· 2 2 # coding=utf-8 3 3 # SPDX-License-Identifier: GPL-2.0 4 4 # 5 - u""" 5 + """ 6 6 kernel-abi 7 7 ~~~~~~~~~~ 8 8 ··· 55 55 _kernel_abi = None 56 56 57 57 def get_kernel_abi(): 58 - u""" 58 + """ 59 59 Initialize kernel_abi global var, if not initialized yet. 60 60 61 61 This is needed to avoid warnings during Sphinx module initialization. ··· 81 81 82 82 83 83 class KernelCmd(Directive): 84 - u"""KernelABI (``kernel-abi``) directive""" 84 + """KernelABI (``kernel-abi``) directive""" 85 85 86 86 required_arguments = 1 87 87 optional_arguments = 3
+2 -2
Documentation/sphinx/kernel_feat.py
··· 1 1 # coding=utf-8 2 2 # SPDX-License-Identifier: GPL-2.0 3 3 # 4 - u""" 4 + """ 5 5 kernel-feat 6 6 ~~~~~~~~~~~ 7 7 ··· 56 56 57 57 class KernelFeat(Directive): 58 58 59 - u"""KernelFeat (``kernel-feat``) directive""" 59 + """KernelFeat (``kernel-feat``) directive""" 60 60 61 61 required_arguments = 1 62 62 optional_arguments = 2
+2 -2
Documentation/sphinx/kernel_include.py
··· 2 2 # -*- coding: utf-8; mode: python -*- 3 3 # pylint: disable=R0903, C0330, R0914, R0912, E0401 4 4 5 - u""" 5 + """ 6 6 kernel-include 7 7 ~~~~~~~~~~~~~~ 8 8 ··· 56 56 class KernelInclude(Include): 57 57 # ============================================================================== 58 58 59 - u"""KernelInclude (``kernel-include``) directive""" 59 + """KernelInclude (``kernel-include``) directive""" 60 60 61 61 def run(self): 62 62 env = self.state.document.settings.env
+5 -5
Documentation/sphinx/kfigure.py
··· 1 1 # -*- coding: utf-8; mode: python -*- 2 2 # pylint: disable=C0103, R0903, R0912, R0915 3 - u""" 3 + """ 4 4 scalable figure and image handling 5 5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 6 ··· 165 165 166 166 167 167 def setupTools(app): 168 - u""" 168 + """ 169 169 Check available build tools and log some *verbose* messages. 170 170 171 171 This function is called once, when the builder is initiated. ··· 445 445 pass 446 446 447 447 class KernelImage(images.Image): 448 - u"""KernelImage directive 448 + """KernelImage directive 449 449 450 450 Earns everything from ``.. image::`` directive, except *remote URI* and 451 451 *glob* pattern. The KernelImage wraps a image node into a ··· 481 481 """Node for ``kernel-figure`` directive.""" 482 482 483 483 class KernelFigure(Figure): 484 - u"""KernelImage directive 484 + """KernelImage directive 485 485 486 486 Earns everything from ``.. figure::`` directive, except *remote URI* and 487 487 *glob* pattern. The KernelFigure wraps a figure node into a kernel_figure ··· 557 557 pass 558 558 559 559 class KernelRender(Figure): 560 - u"""KernelRender directive 560 + """KernelRender directive 561 561 562 562 Render content by external tool. Has all the options known from the 563 563 *figure* directive, plus option ``caption``. If ``caption`` has a
+1 -1
Documentation/sphinx/load_config.py
··· 9 9 def loadConfig(namespace): 10 10 # ------------------------------------------------------------------------------ 11 11 12 - u"""Load an additional configuration file into *namespace*. 12 + """Load an additional configuration file into *namespace*. 13 13 14 14 The name of the configuration file is taken from the environment 15 15 ``SPHINX_CONF``. The external configuration file extends (or overwrites) the
+2 -2
Documentation/sphinx/maintainers_include.py
··· 3 3 # -*- coding: utf-8; mode: python -*- 4 4 # pylint: disable=R0903, C0330, R0914, R0912, E0401 5 5 6 - u""" 6 + """ 7 7 maintainers-include 8 8 ~~~~~~~~~~~~~~~~~~~ 9 9 ··· 37 37 ) 38 38 39 39 class MaintainersInclude(Include): 40 - u"""MaintainersInclude (``maintainers-include``) directive""" 40 + """MaintainersInclude (``maintainers-include``) directive""" 41 41 required_arguments = 0 42 42 43 43 def parse_maintainers(self, path):
+5 -5
Documentation/sphinx/rstFlatTable.py
··· 2 2 # -*- coding: utf-8; mode: python -*- 3 3 # pylint: disable=C0330, R0903, R0912 4 4 5 - u""" 5 + """ 6 6 flat-table 7 7 ~~~~~~~~~~ 8 8 ··· 99 99 class FlatTable(Table): 100 100 # ============================================================================== 101 101 102 - u"""FlatTable (``flat-table``) directive""" 102 + """FlatTable (``flat-table``) directive""" 103 103 104 104 option_spec = { 105 105 'name': directives.unchanged ··· 135 135 class ListTableBuilder(object): 136 136 # ============================================================================== 137 137 138 - u"""Builds a table from a double-stage list""" 138 + """Builds a table from a double-stage list""" 139 139 140 140 def __init__(self, directive): 141 141 self.directive = directive ··· 212 212 raise SystemMessagePropagation(error) 213 213 214 214 def parseFlatTableNode(self, node): 215 - u"""parses the node from a :py:class:`FlatTable` directive's body""" 215 + """parses the node from a :py:class:`FlatTable` directive's body""" 216 216 217 217 if len(node) != 1 or not isinstance(node[0], nodes.bullet_list): 218 218 self.raiseError( ··· 225 225 self.roundOffTableDefinition() 226 226 227 227 def roundOffTableDefinition(self): 228 - u"""Round off the table definition. 228 + """Round off the table definition. 229 229 230 230 This method rounds off the table definition in :py:member:`rows`. 231 231