From b858737a526d9ca9b4d07a97e423a81d6a4166b3 Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Tue, 21 Oct 2025 17:44:46 -0300 Subject: [PATCH] Fix test warnings about invalid regex escape --- numpydoc/tests/hooks/test_validate_hook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numpydoc/tests/hooks/test_validate_hook.py b/numpydoc/tests/hooks/test_validate_hook.py index b235313b..7d4d2378 100644 --- a/numpydoc/tests/hooks/test_validate_hook.py +++ b/numpydoc/tests/hooks/test_validate_hook.py @@ -250,7 +250,7 @@ def test_validate_hook_exclude_option_setup_cfg(example_module, tmp_path, capsys @pytest.mark.parametrize( "regex, expected_code", - [(".*(/|\\\\)example.*\.py", 0), (".*/non_existent_match.*\.py", 1)], + [(r".*(/|\\\\)example.*\.py", 0), (r".*/non_existent_match.*\.py", 1)], ) def test_validate_hook_exclude_files_option_pyproject( example_module, regex, expected_code, tmp_path @@ -287,7 +287,7 @@ def test_validate_hook_exclude_files_option_pyproject( @pytest.mark.parametrize( "regex, expected_code", - [(".*(/|\\\\)example.*\.py", 0), (".*/non_existent_match.*\.py", 1)], + [(r".*(/|\\\\)example.*\.py", 0), (r".*/non_existent_match.*\.py", 1)], ) def test_validate_hook_exclude_files_option_setup_cfg( example_module, regex, expected_code, tmp_path