Skip to content

Commit

Permalink
fix 'consider-using-f-string' lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin authored and mergify[bot] committed Oct 19, 2023
1 parent e301309 commit c20b63f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nixpkgs_review/cli/wip.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def wip_command(args: argparse.Namespace) -> Path:
allow = AllowedFeatures(args.allow)
with Buildenv(allow.aliases, args.extra_nixpkgs_config) as nixpkgs_config:
return review_local_revision(
"rev-%s-dirty" % verify_commit_hash("HEAD"),
f"rev-{verify_commit_hash('HEAD')}-dirty",
args,
allow,
nixpkgs_config,
Expand Down
5 changes: 2 additions & 3 deletions nixpkgs_review/review.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def apply_unstaged(self, staged: bool = False) -> None:
result = subprocess.run(["git", "apply"], cwd=self.worktree_dir(), input=diff)

if result.returncode != 0:
warn("Failed to apply diff in %s" % self.worktree_dir())
warn(f"Failed to apply diff in {self.worktree_dir()}")
sys.exit(1)

def build_commit(
Expand Down Expand Up @@ -396,8 +396,7 @@ def list_packages(
res = subprocess.run(cmd, stdout=tmp)
if res.returncode != 0:
raise NixpkgsReviewError(
"Failed to list packages: nix-env failed with exit code %d"
% res.returncode
f"Failed to list packages: nix-env failed with exit code {res.returncode}"
)
tmp.flush()
with open(tmp.name, encoding="utf-8") as f:
Expand Down

0 comments on commit c20b63f

Please sign in to comment.