summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_parser.py
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2025-04-08 13:09:30 +0300
committerJonathan Corbet <corbet@lwn.net>2025-04-09 21:10:34 +0300
commite4b2bd908c3d8f071d4fac6e588fffc6110c1b1f (patch)
tree8edcb680cf306d76f968d57c2d45d885e4d9a13a /scripts/lib/kdoc/kdoc_parser.py
parent91d00bd54f300b614d48002d4ec8cc28b3f0b2a5 (diff)
downloadlinux-e4b2bd908c3d8f071d4fac6e588fffc6110c1b1f.tar.xz
scripts/lib/kdoc/kdoc_parser.py: remove a python 3.9 dependency
str.removesuffix() was added on Python 3.9, but rstrip() actually does the same thing, as we just want to remove a single character. It is also shorter. So, use it. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/f64cc4adef107ada26da4bfb7e4b7002dd783173.1744106242.git.mchehab+huawei@kernel.org
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
-rwxr-xr-xscripts/lib/kdoc/kdoc_parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py
index f923600561f8..77e8bfeccc8e 100755
--- a/scripts/lib/kdoc/kdoc_parser.py
+++ b/scripts/lib/kdoc/kdoc_parser.py
@@ -1641,7 +1641,7 @@ class KernelDoc:
# Group continuation lines on prototypes
if self.state == self.STATE_PROTO:
if line.endswith("\\"):
- prev += line.removesuffix("\\")
+ prev += line.rstrip("\\")
cont = True
if not prev_ln: