Skip to content

Commit e4b2bd9

Browse files
mchehabJonathan Corbet
authored andcommitted
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
1 parent 91d00bd commit e4b2bd9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/lib/kdoc/kdoc_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,7 @@ def run(self):
16411641
# Group continuation lines on prototypes
16421642
if self.state == self.STATE_PROTO:
16431643
if line.endswith("\\"):
1644-
prev += line.removesuffix("\\")
1644+
prev += line.rstrip("\\")
16451645
cont = True
16461646

16471647
if not prev_ln:

0 commit comments

Comments
 (0)