pyupgrade: Reformat with --py36-plus.

This includes mainly fixes of string literals using f-strings or
.format(...), as well as unpacking of list comprehensions.
This commit is contained in:
PIG208 2021-05-28 19:19:40 +08:00 committed by Tim Abbott
parent e27ac0ddbe
commit 9ce7c52a10
78 changed files with 356 additions and 389 deletions

View file

@ -35,7 +35,7 @@ def check_git_pristine() -> None:
def ensure_on_clean_master() -> None:
branch = get_git_branch()
if branch != "master":
exit("You are still on a feature branch: %s" % (branch,))
exit(f"You are still on a feature branch: {branch}")
check_git_pristine()
run("git fetch upstream master")
run("git rebase upstream/master")
@ -43,7 +43,7 @@ def ensure_on_clean_master() -> None:
def create_pull_branch(pull_id: int) -> None:
run("git fetch upstream pull/%d/head" % (pull_id,))
run("git checkout -B review-%s FETCH_HEAD" % (pull_id,))
run(f"git checkout -B review-{pull_id} FETCH_HEAD")
run("git rebase upstream/master")
run("git log upstream/master.. --oneline")
run("git diff upstream/master.. --name-status")