Modernize usage of re.sub deprecated in Python 3.13

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2026-02-18 20:10:40 +01:00
parent f41a9f6056
commit 316ec76508
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -762,7 +762,7 @@ def escaped_split(inp_str, split_char):
raise ValueError('Expected split character. Found string!')
out = re.sub(r'(\\.)|' + split_char,
lambda m: m.group(1) or '\n', inp_str,
len(inp_str)).split('\n')
count=len(inp_str)).split('\n')
out = [x for x in out if x]
return out