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:
|
else:
|
||||||
cratef, crate, version = download(crate, version)
|
cratef, crate, version = download(crate, version)
|
||||||
|
|
||||||
with files_from_crate(cratef, crate, version) as files:
|
with files_from_crate(cratef, crate, version) as (toml, doc_files, license_files):
|
||||||
diff = make_patch(files[0], enabled=patch)
|
diff = make_patch(toml, enabled=patch)
|
||||||
metadata = Metadata.from_file(files[0])
|
metadata = Metadata.from_file(toml)
|
||||||
doc_files, license_files = files[1:3]
|
|
||||||
if store:
|
if store:
|
||||||
shutil.copy2(cratef, os.path.join(os.getcwd(), f"{metadata.name}-{version}.crate"))
|
shutil.copy2(cratef, os.path.join(os.getcwd(), f"{metadata.name}-{version}.crate"))
|
||||||
return crate, diff, metadata, doc_files, license_files
|
return crate, diff, metadata, doc_files, license_files
|
||||||
|
|
Loading…
Reference in a new issue