Skip to content

Commit 1db5137

Browse files
authored
Remove ./tools/scons/ from ruff exclusion list. NFC (emscripten-core#27423)
1 parent fec5d61 commit 1db5137

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ exclude = [
1414
"./test/third_party/",
1515
"./third_party/",
1616
"./tools/filelock.py",
17-
"./tools/scons/",
1817
".git",
1918
]
2019

tools/scons/site_scons/site_tools/emscripten/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
# University of Illinois/NCSA Open Source License. Both these licenses can be
55
# found in the LICENSE file.
66

7-
from .emscripten import exists, generate
7+
from .emscripten import exists as exists
8+
from .emscripten import generate as generate

tools/scons/site_scons/site_tools/emscripten/emscripten.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# University of Illinois/NCSA Open Source License. Both these licenses can be
55
# found in the LICENSE file.
66

7-
from __future__ import print_function
87
import os
98

109

@@ -15,9 +14,8 @@ def path_to_bin(emscripten_root, bin_name):
1514
return os.path.join(emscripten_root, bin_name)
1615

1716

18-
def generate(env, **kw):
19-
""" SCons tool entry point """
20-
17+
def generate(env, **_kw):
18+
"""SCons tool entry point."""
2119
# SCons does not by default invoke the compiler with the
2220
# environment variables from the parent calling process,
2321
# so manually route all environment variables referenced
@@ -41,9 +39,8 @@ def generate(env, **kw):
4139
if var in os.environ:
4240
env['ENV'][var] = os.environ[var]
4341

44-
for var in pkg_config_vars:
42+
for var, real_key in pkg_config_vars.items():
4543
if var in os.environ:
46-
real_key = pkg_config_vars[var]
4744
env['ENV'][real_key] = os.environ[var]
4845

4946
# Binary paths will be constructed from here if available.
@@ -64,6 +61,6 @@ def generate(env, **kw):
6461
env.Replace(PROGSUFFIX='.js')
6562

6663

67-
def exists(env):
68-
""" NOOP method required by SCons """
64+
def exists(_env):
65+
"""NOOP method required by SCons."""
6966
return 1

0 commit comments

Comments
 (0)