Skip to content

Commit

Permalink
🚨 Raise without else
Browse files Browse the repository at this point in the history
Signed-off-by: Evaline Ju <[email protected]>
  • Loading branch information
evaline-ju committed Aug 19, 2024
1 parent 24fbc92 commit 723ade9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions caikit_nlp/toolkit/text_generation/tgis_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,7 @@ def unary_generate(
raise CaikitCoreException(
caikit_status_code, INACTIVE_RPC_CONN_ERR_MESSAGE
) from err
else:
raise CaikitCoreException(caikit_status_code, details) from err
raise CaikitCoreException(caikit_status_code, details) from err
except grpc.RpcError as err:
raise_caikit_core_exception(err)

Expand Down Expand Up @@ -676,8 +675,7 @@ def stream_generate(
raise CaikitCoreException(
caikit_status_code, INACTIVE_RPC_CONN_ERR_MESSAGE
) from err
else:
raise CaikitCoreException(caikit_status_code, details) from err
raise CaikitCoreException(caikit_status_code, details) from err
except grpc.RpcError as err:
raise_caikit_core_exception(err)

Expand Down

0 comments on commit 723ade9

Please sign in to comment.