Skip to content

Commit 53074bf

Browse files
committed
Use removeprefix instead
1 parent 4d60377 commit 53074bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/commands/download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def _download_hands_on(hands_on: str, formatted_hands_on: str) -> None:
126126
with ExercisesRepo() as repo:
127127
info(f"Checking if {hands_on} is available")
128128

129-
hands_on_without_prefix = formatted_hands_on[len("hp_") :]
129+
hands_on_without_prefix = formatted_hands_on.removeprefix("hp_")
130130

131131
if not repo.has_file(f"hands_on/{hands_on_without_prefix}.py"):
132132
error(

0 commit comments

Comments
 (0)