Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ def tearDown(self):
]

left_over_files = set(temp_files_after_run) - set(self.temp_files_before_run)
left_over_files = [f for f in left_over_files if not any(f.startswith(p) for p in ignorable_file_prefixes)]
left_over_files = [f for f in left_over_files if not f.startswith(ignorable_file_prefixes)]
if left_over_files:
errlog(f'ERROR: After running test, there are {len(left_over_files)} new temporary files/directories left behind:')
for f in left_over_files:
Expand Down
6 changes: 3 additions & 3 deletions test/test_posixtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ class posixtest(RunnerCore):


def filter_tests(all_tests):
prefixes = [
prefixes = (
'pthread_',
'strftime',
'asctime',
'gmtime',
]
)

def enable_test(t):
return any(t.startswith(p) for p in prefixes)
return t.startswith(prefixes)

return [t for t in all_tests if enable_test(t)]

Expand Down
2 changes: 1 addition & 1 deletion tools/maint/add_license.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@


def process_file(filename):
if any(filename.startswith(ex) for ex in exclude_filenames):
if filename.startswith(exclude_filenames):
return
ext = os.path.splitext(filename)[1]
if ext not in {'.py', '.c', '.cpp', '.h', '.js'}:
Expand Down
4 changes: 2 additions & 2 deletions tools/maint/gen_sig_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def ignore_symbol(s, cxx):
# don't need to be auto-generated.
if s.startswith(('emscripten_gl', 'emscripten_alc')):
return True
if s.startswith('gl') and any(s.endswith(x) for x in ('NV', 'EXT', 'WEBGL', 'ARB', 'ANGLE')):
if s.startswith('gl') and s.endswith(('NV', 'EXT', 'WEBGL', 'ARB', 'ANGLE')):
return True
if s in {'__stack_base', '__memory_base', '__table_base', '__global_base', '__heap_base',
'__stack_pointer', '__stack_high', '__stack_low',
Expand Down Expand Up @@ -267,7 +267,7 @@ def remove_sigs(sig_info):

def strip_line(l):
l = l.strip()
return any(l.startswith(r) for r in to_remove)
return l.startswith(to_remove)

files = glob.glob('src/*.js') + glob.glob('src/**/*.js')
for file in files:
Expand Down
2 changes: 1 addition & 1 deletion tools/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ def is_internal_global(name):
'__start_em_lib_deps', '__stop_em_lib_deps',
'__em_lib_deps'}
internal_prefixes = ('__em_js__', '__em_lib_deps')
return name in internal_start_stop_symbols or any(name.startswith(p) for p in internal_prefixes)
return name in internal_start_stop_symbols or name.startswith(internal_prefixes)


def is_user_export(name):
Expand Down
Loading