Skip to content

Commit

Permalink
gh-103801: Tools/wasm linting and formatting (#103796)
Browse files Browse the repository at this point in the history
This PR makes three minor linting adjustments to the `wasm` module
caught by [ruff](/~https://github.com/charliermarsh/ruff).

<!-- gh-issue-number: gh-103801 -->
* Issue: gh-103801
<!-- /gh-issue-number -->

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
  • Loading branch information
dversoza and blurb-it[bot] authored Apr 24, 2023
1 parent d94b3a6 commit 01be52e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
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

0 comments on commit 01be52e

Please sign in to comment.