Skip to content

Commit f8e3819

Browse files
committed
Address pointless Python linting nits to unblock the universe
1 parent d024c1e commit f8e3819

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

utils/recursive-lipo

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,31 @@ def merge_file_lists(src_root_dirs, skip_files):
3131
def overlapping_lipo_architectures(file_paths, lipo_executable):
3232
lipo_cmd = [lipo_executable, "-archs"]
3333

34-
known_archs=[]
34+
known_archs = []
3535
for file in file_paths:
36-
archs=shell.capture(lipo_cmd + [file], echo=False).split(' ')
36+
archs = shell.capture(lipo_cmd + [file], echo=False).split(' ')
3737
for arch in archs:
38-
arch=arch.strip()
38+
arch = arch.strip()
3939
if arch in known_archs:
4040
return True
4141
known_archs.append(arch)
4242
return False
4343

44+
4445
# Copy the file
4546
def copy_file(file, src_root_dirs, dest_root_dir):
4647
for dir in src_root_dirs:
47-
orig_file=os.path.join(dir, file)
48+
orig_file = os.path.join(dir, file)
4849
if os.path.exists(orig_file):
49-
dest_file=os.path.join(
50+
dest_file = os.path.join(
5051
dest_root_dir, os.path.relpath(orig_file, dir))
5152
print("-- Copying file %s" % dest_file)
5253
shutil.copy2(orig_file, dest_file)
5354
return
5455

5556
print("-- Warning: unable to copy file %s" % file)
5657

58+
5759
def merge_lipo_files(src_root_dirs, file_list, dest_root_dir, verbose=False,
5860
lipo_executable="lipo"):
5961
"""Recursively merges and runs lipo on all files from file_list in
@@ -105,13 +107,15 @@ def merge_lipo_files(src_root_dirs, file_list, dest_root_dir, verbose=False,
105107
# copy the file directly.
106108
copy_file(file, src_root_dirs, dest_root_dir)
107109
else:
108-
# Multiple instances are different and executable, try lipo.
109-
if verbose:
110-
print("-- Running lipo %s to %s" % (file_paths, dest_path))
111-
else:
112-
print("-- Running lipo %s" % dest_path)
113-
shell.call(lipo_cmd + ["-output", dest_path] + file_paths,
114-
echo=verbose)
110+
# Multiple instances are different and executable, try lipo.
111+
if verbose:
112+
print("-- Running lipo %s to %s" %
113+
(file_paths, dest_path))
114+
else:
115+
print("-- Running lipo %s" % dest_path)
116+
shell.call((lipo_cmd + ["-output", dest_path] +
117+
file_paths),
118+
echo=verbose)
115119
else:
116120
# Multiple instances are different, and they're not executable.
117121
print(

0 commit comments

Comments
 (0)