From 089e919e1985d04659ccdfc71ade8c7af9203fc5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 28 Jan 2024 14:02:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- repo2docker/_version.py | 4 ++-- versioneer.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/repo2docker/_version.py b/repo2docker/_version.py index d3b8edb1..065fdc81 100644 --- a/repo2docker/_version.py +++ b/repo2docker/_version.py @@ -119,7 +119,7 @@ def run_command( return None, None else: if verbose: - print("unable to find command, tried {}".format(commands)) + print(f"unable to find command, tried {commands}") return None, None stdout = process.communicate()[0].strip().decode() if process.returncode != 0: @@ -381,7 +381,7 @@ def git_pieces_from_vcs( if verbose: fmt = "tag '%s' doesn't start with prefix '%s'" print(fmt % (full_tag, tag_prefix)) - pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % ( + pieces["error"] = "tag '{}' doesn't start with prefix '{}'".format( full_tag, tag_prefix, ) diff --git a/versioneer.py b/versioneer.py index 10909eb4..5d28b0d6 100644 --- a/versioneer.py +++ b/versioneer.py @@ -502,7 +502,7 @@ def run_command( return None, None else: if verbose: - print("unable to find command, tried {}".format(commands)) + print(f"unable to find command, tried {commands}") return None, None stdout = process.communicate()[0].strip().decode() if process.returncode != 0: @@ -1418,7 +1418,7 @@ def git_pieces_from_vcs( if verbose: fmt = "tag '%s' doesn't start with prefix '%s'" print(fmt % (full_tag, tag_prefix)) - pieces["error"] = "tag '%s' doesn't start with prefix '%s'" % ( + pieces["error"] = "tag '{}' doesn't start with prefix '{}'".format( full_tag, tag_prefix, ) @@ -1867,7 +1867,7 @@ def get_versions(verbose: bool = False) -> Dict[str, Any]: try: ver = versions_from_file(versionfile_abs) if verbose: - print("got version from file {} {}".format(versionfile_abs, ver)) + print(f"got version from file {versionfile_abs} {ver}") return ver except NotThisMethod: pass