Skip to content

Commit f2212f8

Browse files
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.
1 parent 8abd2da commit f2212f8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

codeinsight_sdk/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ def inventories(self):
9090
def experimental(self) -> ExperimentalHandler:
9191
if self.experimental_enabled == False:
9292
raise CodeInsightError("Experimental API is not enabled for this instance")
93-
else:
94-
return ExperimentalHandler(self)
93+
return ExperimentalHandler(self)
9594

9695
# Coming soon...?
9796

0 commit comments

Comments
 (0)