Skip to content

Commit 4d60377

Browse files
committed
Remove use of lstrip
lstrip treats all the characters of the string as valid, so it removed the leading p as well
1 parent 92904d7 commit 4d60377

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.lstrip("hp_")
129+
hands_on_without_prefix = formatted_hands_on[len("hp_") :]
130130

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

0 commit comments

Comments
 (0)