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
7 changes: 7 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,12 @@ jobs:
- run: ruff check
# TODO (cclauss): When ruff supports rules these errors without --preview, remove following line
- run: ruff check --preview --select=E20,E30,E221,E225,E226
vulture:
executor: focal
steps:
- checkout
- pip-install
- run: vulture . --min-confidence 100
mypy:
executor: focal
steps:
Expand Down Expand Up @@ -1213,6 +1219,7 @@ workflows:
jobs:
- ruff
- mypy
- vulture
- eslint
- build-docs
- build-linux
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,6 @@ ignore_missing_imports = true

[tool.deadcode]
exclude = ["out", "cache", "third_party", "test/third_party", "node_modules", "site/source/_themes", "site/source/conf.py"]

[tool.vulture]
exclude = ["out", "cache", "third_party", "test/third_party", "node_modules", "site/source/_themes", "site/source/conf.py"]
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ruff==0.11.7
types-requests==2.32.0.20241016
unittest-xml-reporting==3.2.0
deadcode==2.3.1
vulture==2.14

# This version is mentioned in `site/source/docs/site/about.rst`.
# Please keep them in sync.
Expand Down
8 changes: 4 additions & 4 deletions test/test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def __init__(self, name, cc, cxx, args=None):
self.cxx = cxx
self.args = args or [OPTIMIZATIONS]

def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder, has_output_parser):
def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder):
native_args = native_args or []
shared_args = shared_args or []
self.parent = parent
Expand Down Expand Up @@ -213,7 +213,7 @@ def __init__(self, name, engine, extra_args=None, env=None, binaryen_opts=None):
self.env.update(env)
self.binaryen_opts = binaryen_opts or []

def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder, has_output_parser):
def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder):
emcc_args = emcc_args or []
self.filename = filename
llvm_root = self.env.get('LLVM') or config.LLVM_ROOT
Expand Down Expand Up @@ -294,7 +294,7 @@ def __init__(self, name, engine, args=None, binaryen_opts=None):
self.args = args or [OPTIMIZATIONS]
self.binaryen_opts = binaryen_opts or []

def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder, has_output_parser):
def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder):
cheerp_args = [
'-fno-math-errno',
]
Expand Down Expand Up @@ -459,7 +459,7 @@ def do_benchmark(self, name, src, expected_output='FAIL', args=None,
reps = 0
baseline = b
print('Running benchmarker: %s: %s' % (b.__class__.__name__, b.name))
b.build(self, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder, has_output_parser=output_parser is not None)
b.build(self, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder)
b.bench(args, output_parser, reps, expected_output)
recorded_stats = b.display(baseline)
if recorded_stats:
Expand Down
2 changes: 1 addition & 1 deletion test/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7486,7 +7486,7 @@ def test2():
'no_dynamic': (['--bind', '-sDYNAMIC_EXECUTION=0', '-sLEGACY_VM_SUPPORT'],),
})
def test_embind_val_basics(self, args):
if '-sLEGACY_VM_SUPPORT':
if '-sLEGACY_VM_SUPPORT' in args:
if self.get_setting('MODULARIZE') == 'instance' or self.get_setting('WASM_ESM_INTEGRATION'):
self.skipTest('LEGACY_VM_SUPPORT is not compatible with EXPORT_ES6')
if self.is_wasm64():
Expand Down
4 changes: 2 additions & 2 deletions tools/filelock.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def __init__(self, lock):
def __enter__(self):
return self.lock

def __exit__(self, exc_type, exc_value, traceback):
def __exit__(self, _exc_type, _exc_value, _traceback):
self.lock.release()
return None

Expand Down Expand Up @@ -330,7 +330,7 @@ def __enter__(self):
self.acquire()
return self

def __exit__(self, exc_type, exc_value, traceback):
def __exit__(self, _exc_type, _exc_value, _traceback):
self.release()
return None

Expand Down
2 changes: 1 addition & 1 deletion tools/gen_struct_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __enter__(self):
self.code.append('puts("{");')
return self

def __exit__(self, exc_type, exc_val, exc_tb):
def __exit__(self, _exc_type, _exc_val, _exc_tb):
if self.has_data:
self.code.append('puts("");')
self.code.append('printf("}");')
Expand Down