chore: fix pylint-2.7 errors (#33233)
This commit is contained in:
parent
fdb60240f3
commit
45e2f86fe0
13 changed files with 30 additions and 32 deletions
|
@ -7,7 +7,7 @@ def main(zip_path, manifest_in):
|
|||
with open(manifest_in, 'r') as manifest, \
|
||||
zipfile.ZipFile(zip_path, 'r', allowZip64=True) as z:
|
||||
files_in_zip = set(z.namelist())
|
||||
files_in_manifest = set([l.strip() for l in manifest.readlines()])
|
||||
files_in_manifest = {l.strip() for l in manifest.readlines()}
|
||||
added_files = files_in_zip - files_in_manifest
|
||||
removed_files = files_in_manifest - files_in_zip
|
||||
if added_files:
|
||||
|
@ -18,10 +18,8 @@ def main(zip_path, manifest_in):
|
|||
print("Files removed from bundle:")
|
||||
for f in sorted(list(removed_files)):
|
||||
print('-' + f)
|
||||
if added_files or removed_files:
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
||||
return 1 if added_files or removed_files else 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(*sys.argv[1:]))
|
||||
sys.exit(main(sys.argv[1], sys.argv[2]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue