From f2212f81163962068ebd139bc491708adaf73938 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 05:11:47 +0000 Subject: [PATCH] refactor: refactor unnecessary `else` / `elif` when `if` block has a `raise` statement `raise` causes control flow to be disrupted, as it will exit the block. It is recommended to check other conditions using another `if` statement, and get rid of `else` statements as they are unnecessary. --- codeinsight_sdk/client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/codeinsight_sdk/client.py b/codeinsight_sdk/client.py index db7d539..ac5b1e0 100644 --- a/codeinsight_sdk/client.py +++ b/codeinsight_sdk/client.py @@ -90,8 +90,7 @@ def inventories(self): def experimental(self) -> ExperimentalHandler: if self.experimental_enabled == False: raise CodeInsightError("Experimental API is not enabled for this instance") - else: - return ExperimentalHandler(self) + return ExperimentalHandler(self) # Coming soon...?