From 59ec32aaf674256f3a273f718bbce15a66f9e41a Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Fri, 25 Oct 2024 14:44:04 +0100 Subject: [PATCH] Remove deprecated use of count as positional arg Python 13 requires count to be passed as a kwarg rather than a positional arg because of potential confusion with flags, see https://github.com/python/cpython/issues/56166 Signed-off-by: Paul Elliott --- scripts/generate_test_code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_test_code.py b/scripts/generate_test_code.py index 2ac00add2c..4b7f9397e9 100755 --- a/scripts/generate_test_code.py +++ b/scripts/generate_test_code.py @@ -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