From eb75b05f7aebd53904492362d6fd1d71285dfda1 Mon Sep 17 00:00:00 2001 From: wyattscarpenter Date: Wed, 30 Jul 2025 18:54:31 -0400 Subject: [PATCH] Update update_data.py: make the space in error comments optional --- mypy/test/update_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/test/update_data.py b/mypy/test/update_data.py index 84b6383b3f0cf..2e04444d56e09 100644 --- a/mypy/test/update_data.py +++ b/mypy/test/update_data.py @@ -64,7 +64,7 @@ def _iter_fixes( fix_lines = [] for lineno, source_line in enumerate(source_lines, start=1): reports = reports_by_line.get((file_path, lineno)) - comment_match = re.search(r"(?P\s+)(?P# [EWN]: .+)$", source_line) + comment_match = re.search(r"(?P\s+)(?P# ?[EWN]: .+)$", source_line) if comment_match: source_line = source_line[: comment_match.start("indent")] # strip old comment if reports: