From 4ac22da3262ca49ece0cfc7a3bf26751681b47a3 Mon Sep 17 00:00:00 2001 From: JWM <62558419+JokeWaumans@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:57:59 +0100 Subject: [PATCH] Fix: 0 is no error code Co-authored-by: Jasper Craeghs <28319872+JasperCraeghs@users.noreply.github.com> --- src/mlx/warnings/regex_checker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mlx/warnings/regex_checker.py b/src/mlx/warnings/regex_checker.py index 21240182..dd41bec0 100644 --- a/src/mlx/warnings/regex_checker.py +++ b/src/mlx/warnings/regex_checker.py @@ -133,7 +133,8 @@ def return_check_limits(self): for checker in self.checkers.values(): padded_string = [f"{string:<20}" for string in [f"{checker.classification}: "]] count += checker.return_check_limits("".join(padded_string)) - print(f"Returning error code {count}.") + if count: + print(f"Returning error code {count}.") return count def check(self, content):