Skip to content

gh-103801: Tools/wasm linting and formatting #103796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 24, 2023
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds three minor linting fixes to the wasm module caught that were caught by ruff.
3 changes: 2 additions & 1 deletion Tools/wasm/wasm_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

- a stripped down, pyc-only stdlib zip file, e.g. {PREFIX}/lib/python311.zip
- os.py as marker module {PREFIX}/lib/python3.11/os.py
- empty lib-dynload directory, to make sure it is copied into the bundle {PREFIX}/lib/python3.11/lib-dynload/.empty
- empty lib-dynload directory, to make sure it is copied into the bundle:
{PREFIX}/lib/python3.11/lib-dynload/.empty
"""

import argparse
Expand Down
4 changes: 2 additions & 2 deletions Tools/wasm/wasm_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
run "make clean -C '{SRCDIR}'".
"""

INSTALL_NATIVE = f"""
INSTALL_NATIVE = """
Builds require a C compiler (gcc, clang), make, pkg-config, and development
headers for dependencies like zlib.

Expand Down Expand Up @@ -598,7 +598,7 @@ def run_browser(self, bind="127.0.0.1", port=8000):
end = time.monotonic() + 3.0
while time.monotonic() < end and srv.returncode is None:
try:
with socket.create_connection((bind, port), timeout=0.1) as s:
with socket.create_connection((bind, port), timeout=0.1) as _:
pass
except OSError:
time.sleep(0.01)
Expand Down