From 8b4ae5bcf1646b0e6505856029825765eac978a4 Mon Sep 17 00:00:00 2001 From: Doug Tabuchi Date: Mon, 23 Feb 2026 22:15:16 -0500 Subject: [PATCH] fix: pass maxsplit as keyword argument in re.split Python 3 deprecated passing maxsplit as a positional argument to re.split(). This silently emits a DeprecationWarning on every shell startup. Using the keyword form is the correct fix. See: https://docs.python.org/3/library/re.html#re.split --- help2comp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/help2comp.py b/help2comp.py index efb7e1f..3ef63da 100755 --- a/help2comp.py +++ b/help2comp.py @@ -44,7 +44,7 @@ def cut_option(line): if len(opt) > 0: newline = line.replace(opt[0], "", 1).strip(STRIP_CHARS) # return without parameter - return newline, re.split('[ [=]', opt[0], 1)[0] + return newline, re.split('[ [=]', opt[0], maxsplit=1)[0] else: return newline, None