From 592932ca9e3ad4871a0cebd2cd64d7801cc82f8c Mon Sep 17 00:00:00 2001 From: Federico Bond Date: Fri, 3 Jul 2026 12:35:07 +1000 Subject: [PATCH] Strip only the .py suffix from expected-output file names --- pytest_mypy_plugins/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_mypy_plugins/utils.py b/pytest_mypy_plugins/utils.py index 0dfbfdd..240cd1d 100644 --- a/pytest_mypy_plugins/utils.py +++ b/pytest_mypy_plugins/utils.py @@ -286,7 +286,7 @@ def extract_output_matchers_from_comments(fname: str, input_lines: List[str], re The result is a list pf output matchers """ - fname = fname.replace(".py", "") + fname = fname.removesuffix(".py") matchers = [] for index, line in enumerate(input_lines): # The first in the split things isn't a comment