Skip to content

Commit

Permalink
refactor: refactor unnecessary else / elif when if block has a …
Browse files Browse the repository at this point in the history
…`return` statement
  • Loading branch information
deepsource-autofix[bot] authored Oct 22, 2023
1 parent eac01e5 commit 366d517
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python_genshin_artifact/enka/enka_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
def is_ascend(level: int, promote_level: int) -> bool:
if level < 20:
return False
elif 20 <= level < 40:
if 20 <= level < 40:
return promote_level >= 1
else:
expected_promote_level = level // 10 - 2
return promote_level >= expected_promote_level
expected_promote_level = level // 10 - 2
return promote_level >= expected_promote_level


def enka_parser(data: dict, avatar_id: int) -> Tuple[CharacterInfo, WeaponInfo, List[ArtifactInfo]]:
Expand Down

0 comments on commit 366d517

Please sign in to comment.