Skip to content

Commit b858737

Browse files
committed
Fix test warnings about invalid regex escape
1 parent 358ef1e commit b858737

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpydoc/tests/hooks/test_validate_hook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def test_validate_hook_exclude_option_setup_cfg(example_module, tmp_path, capsys
250250

251251
@pytest.mark.parametrize(
252252
"regex, expected_code",
253-
[(".*(/|\\\\)example.*\.py", 0), (".*/non_existent_match.*\.py", 1)],
253+
[(r".*(/|\\\\)example.*\.py", 0), (r".*/non_existent_match.*\.py", 1)],
254254
)
255255
def test_validate_hook_exclude_files_option_pyproject(
256256
example_module, regex, expected_code, tmp_path
@@ -287,7 +287,7 @@ def test_validate_hook_exclude_files_option_pyproject(
287287

288288
@pytest.mark.parametrize(
289289
"regex, expected_code",
290-
[(".*(/|\\\\)example.*\.py", 0), (".*/non_existent_match.*\.py", 1)],
290+
[(r".*(/|\\\\)example.*\.py", 0), (r".*/non_existent_match.*\.py", 1)],
291291
)
292292
def test_validate_hook_exclude_files_option_setup_cfg(
293293
example_module, regex, expected_code, tmp_path

0 commit comments

Comments
 (0)