From 51b6afe94e420f150b45d2a1764ad7b3a996c910 Mon Sep 17 00:00:00 2001 From: JWM <62558419+JokeWaumans@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:57:20 +0100 Subject: [PATCH] Fix: 0 is no error code Co-authored-by: Jasper Craeghs <28319872+JasperCraeghs@users.noreply.github.com> --- src/mlx/warnings/polyspace_checker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mlx/warnings/polyspace_checker.py b/src/mlx/warnings/polyspace_checker.py index 6a1720f1..9ee0a140 100644 --- a/src/mlx/warnings/polyspace_checker.py +++ b/src/mlx/warnings/polyspace_checker.py @@ -119,7 +119,8 @@ def return_check_limits(self): padded_string = [f"{string:<30}" for string in [f"family {checker.family_value!r} ", f"{checker.column_name}: {checker.check_value} "]] 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 parse_config(self, config):