Skip to content

Commit f1b90cf

Browse files
authored
Apply suggestions from code review
1 parent 8c9e584 commit f1b90cf

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

tools/link.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ def get_js_sym_info():
216216
# and can contain full paths to temporary files.
217217
skip_settings = {'PRE_JS_FILES', 'POST_JS_FILES'}
218218
input_files = [json.dumps(settings.external_dict(skip_keys=skip_settings), sort_keys=True, indent=2)]
219-
input_files.extend(read_file(jslib) for jslib in sorted(glob.glob(utils.path_from_root('src') + '/library*.js')))
219+
jslibs = glob.glob(utils.path_from_root('src') + '/library*.js')
220+
input_files.extend(read_file(jslib) for jslib in sorted(jslibs))
220221
for jslib in settings.JS_LIBRARIES:
221222
if not os.path.isabs(jslib):
222223
jslib = utils.path_from_root('src', jslib)

tools/maint/gen_sig_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def ignore_symbol(s, cxx):
181181
'stackSave', 'stackRestore', 'stackAlloc', 'getTempRet0', 'setTempRet0',
182182
}:
183183
return True
184-
return bool(cxx and s == '__asctime_r' or s.startswith('__cxa_find_matching_catch'))
184+
return cxx and s == '__asctime_r' or s.startswith('__cxa_find_matching_catch')
185185

186186

187187
def create_c_file(filename, symbol_list, header):

tools/ports/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def unpack():
326326
utils.write_file(marker, url + '\n')
327327

328328
def up_to_date():
329-
return bool(os.path.exists(marker) and utils.read_file(marker).strip() == url)
329+
return os.path.exists(marker) and utils.read_file(marker).strip() == url
330330

331331
# before acquiring the lock we have an early out if the port already exists
332332
if up_to_date():

tools/ports/bullet.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ def create(final):
3232
shared.safe_ensure_dirs(os.path.dirname(target))
3333
shutil.copyfile(fullpath, target)
3434

35-
includes = [os.path.join(base, dir) for base, dirs, _ in os.walk(src_path, topdown=False) for dir in dirs]
35+
includes = []
36+
for base, dirs, _ in os.walk(src_path, topdown=False):
37+
for dir in dirs:
38+
includes.append(os.path.join(base, dir))
3639

3740
flags = [
3841
'-Wno-single-bit-bitfield-constant-conversion',

0 commit comments

Comments
 (0)