From 87f950496c6d44fc66df924dca8dfbdd3d67d466 Mon Sep 17 00:00:00 2001 From: dpc00 Date: Tue, 29 Sep 2026 11:21:39 -0600 Subject: [PATCH] Pass re.M as flags, not count, in on_stderr re.sub's fourth positional argument is count, so re.M (== 8) limited the substitutions to 8 and never turned on MULTILINE. The '^' anchors then only matched at the very start of stderr, so just a leading FutureWarning/DeprecationWarning was removed and a second one leaked into notify_failure() and the log. Fixes #131 Co-Authored-By: Claude Sonnet 5.5 --- linter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linter.py b/linter.py index a7f9145..86f4d1d 100644 --- a/linter.py +++ b/linter.py @@ -57,8 +57,8 @@ def on_stderr(self, stderr): # FutureWarnings. We just eat those as they're irrelevant here. Note # that we try to eat the subsequent line as well which usually contains # the culprit source line. - stderr = re.sub(r'^.+FutureWarning.+\n(.*\n?)?', '', stderr, re.M) - stderr = re.sub(r'^.+DeprecationWarning.+\n(.*\n?)?', '', stderr, re.M) + stderr = re.sub(r'^.+FutureWarning.+\n(.*\n?)?', '', stderr, flags=re.M) + stderr = re.sub(r'^.+DeprecationWarning.+\n(.*\n?)?', '', stderr, flags=re.M) if stderr: self.notify_failure()