From 929deaceb4f24251743e426c7a3b3e4447cd37c3 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Tue, 18 Dec 2018 08:57:53 -0600 Subject: [PATCH 1/3] Remove f-strings --- repo2docker/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/repo2docker/app.py b/repo2docker/app.py index ef637a79..64daabe0 100644 --- a/repo2docker/app.py +++ b/repo2docker/app.py @@ -426,7 +426,8 @@ class Repo2Docker(Application): self.log.info('Pushing image\n', extra=dict(progress=layers, phase='pushing')) last_emit_time = time.time() - self.log.info(f'Successfully pushed {self.output_image_spec}', extra=dict(phase='pushing')) + self.log.info('Successfully pushed {}'.format(self.output_image_spec), + extra=dict(phase='pushing')) def run_image(self): """Run docker container from built image @@ -568,7 +569,7 @@ class Repo2Docker(Application): if not os.path.isdir(checkout_path): self.log.error('Subdirectory %s does not exist', self.subdir, extra=dict(phase='failure')) - raise FileNotFoundError(f'Could not find {checkout_path}') + raise FileNotFoundError('Could not find {}'.format(checkout_path)) with chdir(checkout_path): for BP in self.buildpacks: From 3cadb1832dd55f11e8dcc35f9be8ff8687c4f2da Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Tue, 18 Dec 2018 09:07:52 -0600 Subject: [PATCH 2/3] Another f-string --- repo2docker/contentproviders/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo2docker/contentproviders/git.py b/repo2docker/contentproviders/git.py index dd15be7e..1060a670 100644 --- a/repo2docker/contentproviders/git.py +++ b/repo2docker/contentproviders/git.py @@ -38,7 +38,7 @@ class Git(ContentProvider): if hash is None: self.log.error('Failed to check out ref %s', ref, extra=dict(phase='failed')) - raise ValueError(f'Failed to check out ref {ref}') + raise ValueError('Failed to check out ref {}'.format(ref)) # If the hash is resolved above, we should be able to reset to it for line in execute_cmd(['git', 'reset', '--hard', hash], cwd=output_dir, From 4f72fd8c947b8d981d43d8be91b67c95f6fc5fc4 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Tue, 18 Dec 2018 09:29:28 -0600 Subject: [PATCH 3/3] Remove f-string in test --- tests/unit/test_args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_args.py b/tests/unit/test_args.py index d4b1a565..a1401468 100644 --- a/tests/unit/test_args.py +++ b/tests/unit/test_args.py @@ -14,7 +14,7 @@ def test_version(capsys): """ with pytest.raises(SystemExit): make_r2d(['--version']) - assert capsys.readouterr().out == f"{__version__}\n" + assert capsys.readouterr().out == "{}\n".format(__version__) def test_simple(): """