Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Refactor unnecessary else / elif when if block has a raise st…
Browse files Browse the repository at this point in the history
…atement (#89)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] committed Oct 19, 2021
1 parent 7adec2c commit 157592d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ifpd2/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ def __getitem__(self, key: str) -> Any:
allowed_columns = ["score", *const.database_columns]
if key not in allowed_columns:
raise KeyError(f"unrecognized key '{key}'")
else:
return self.data[key]
return self.data[key]

def __repr__(self) -> str:
return str(self._data)
Expand Down

0 comments on commit 157592d

Please sign in to comment.