Rector explicit indexing into a tuple unpacking
This commit is contained in:
parent
bdaa087c17
commit
a2b42c056c
1 changed files with 3 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue