From a2b42c056c3451f9fea9d2361a7113d0ab9750e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 28 Sep 2021 13:20:26 +0200 Subject: [PATCH] Rector explicit indexing into a tuple unpacking --- rust2rpm/__main__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index 65a9491..aa8846f 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -255,10 +255,9 @@ def make_diff_metadata(crate, version, patch=False, store=False): else: cratef, crate, version = download(crate, version) - with files_from_crate(cratef, crate, version) as files: - diff = make_patch(files[0], enabled=patch) - metadata = Metadata.from_file(files[0]) - doc_files, license_files = files[1:3] + with files_from_crate(cratef, crate, version) as (toml, doc_files, license_files): + diff = make_patch(toml, enabled=patch) + metadata = Metadata.from_file(toml) if store: shutil.copy2(cratef, os.path.join(os.getcwd(), f"{metadata.name}-{version}.crate")) return crate, diff, metadata, doc_files, license_files