Skip to content

Commit 2864540

Browse files
committed
Pass count as keyword argument to re.sub()
This fixes two test failures under Python 3.13: ``` Failed Tests (2): FileCheck.py integration tests :: tests/extra_features/pseudo_numeric_variables/01_line_variable_once/test.itest FileCheck.py integration tests :: tests/extra_features/pseudo_numeric_variables/02_line_variable_twice/test.itest ``` Both are failing due to: ``` filecheck/filecheck.py:372: DeprecationWarning: 'count' is passed as positional argument ``` Passing `count` as positional argument to `re.sub()` has been deprecated in Python 3.13: https://docs.python.org/3.13/whatsnew/3.13.html#id9 and produces a `DeprecationWarning` exception.
1 parent 195aa15 commit 2864540

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

filecheck/filecheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def parse_check(line: str, line_idx, config: Config) -> Optional[Check]:
374374
LINE_NUMBER_REGEX,
375375
str(line_idx + offset + 1),
376376
check_expression,
377-
1,
377+
count=1,
378378
)
379379
line_var_match = re.search(LINE_NUMBER_REGEX, check_expression)
380380

0 commit comments

Comments
 (0)