Skip to content

Commit

Permalink
test/upload-results: use removeprefix() instead of lstrip()
Browse files Browse the repository at this point in the history
lstrip() is for stripping a class of characters, not removing a string
of text.
  • Loading branch information
achilleas-k committed Apr 9, 2024
1 parent 07cd1a8 commit 4f42f41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/scripts/upload-results
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main():
with open(info_path, "r", encoding="utf-8") as info_fp:
build_info = json.load(info_fp)
# strip the PR prefix
build_info["pr"] = pr_number.lstrip("PR-")
build_info["pr"] = pr_number.removeprefix("PR-")
with open(info_path, "w", encoding="utf-8") as info_fp:
json.dump(build_info, info_fp, indent=2)

Expand Down

0 comments on commit 4f42f41

Please sign in to comment.