diff --git a/poetry/installation/executor.py b/poetry/installation/executor.py index 2cc86e20cc5..caa5fdd13d8 100644 --- a/poetry/installation/executor.py +++ b/poetry/installation/executor.py @@ -616,11 +616,7 @@ def _download_link(self, operation, link): for hash_type in hash_types: archive_hashes.add( "{}:{}".format( - hash_type, - FileDependency( - package.name, - path, - ).hash(hash_type), + hash_type, FileDependency(package.name, path).hash(hash_type), ) ) diff --git a/tests/installation/test_executor.py b/tests/installation/test_executor.py index 2aaf1cedf55..6bef9c44c95 100644 --- a/tests/installation/test_executor.py +++ b/tests/installation/test_executor.py @@ -336,11 +336,7 @@ def test_executor_should_hash_links(config, io, pool, mocker, fixture_dir, tmp_d .joinpath("demo-0.1.0-py2.py3-none-any.whl") .as_uri() ) - mocker.patch.object( - Chef, - "get_cached_archive_for_link", - side_effect=lambda _: link, - ) + mocker.patch.object(Chef, "get_cached_archive_for_link", side_effect=lambda _: link) env = MockEnv(path=Path(tmp_dir)) executor = Executor(env, pool, config, io) @@ -362,11 +358,7 @@ def test_executor_should_hash_links(config, io, pool, mocker, fixture_dir, tmp_d def test_executor_should_hash_paths(config, io, pool, mocker, fixture_dir, tmp_dir): link = fixture_dir("distributions").joinpath("demo-0.1.0-py2.py3-none-any.whl") - mocker.patch.object( - Chef, - "get_cached_archive_for_link", - side_effect=lambda _: link, - ) + mocker.patch.object(Chef, "get_cached_archive_for_link", side_effect=lambda _: link) env = MockEnv(path=Path(tmp_dir)) executor = Executor(env, pool, config, io)