From 709bad0f2d76707c949ba2757c50ddd2554e4c40 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Tue, 22 Apr 2025 19:42:07 +0300 Subject: Correctly ignore broad-expection-raised exceptions. Signed-off-by: Munyoki Kilyungi --- gn3/commands.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gn3/commands.py b/gn3/commands.py index ee3e32b..3598e2f 100644 --- a/gn3/commands.py +++ b/gn3/commands.py @@ -90,8 +90,9 @@ def compose_pcorrs_command( return "pearsons" if "spearmans" in mthd: return "spearmans" + # pylint: disable=[broad-exception-raised] raise Exception( - f"Invalid method '{method}'") # pylint: disable=[broad-exception-raised] + f"Invalid method '{method}'") prefix_cmd = ( f"{sys.executable}", "-m", "scripts.partial_correlations", @@ -105,8 +106,9 @@ def compose_pcorrs_command( kwargs.get("target_database") is None and kwargs.get("target_traits") is not None): return compose_pcorrs_command_for_selected_traits(prefix_cmd, **kwargs) + # pylint: disable=[broad-exception-raised] raise Exception( - "Invalid state: I don't know what command to generate!") # pylint: disable=[broad-exception-raised] + "Invalid state: I don't know what command to generate!") def queue_cmd(conn: Redis, -- cgit 1.4.1