]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-103801: Tools/wasm linting and formatting (#103796)
authorDaniel Versoza <daniel.ve3@gmail.com>
Mon, 24 Apr 2023 22:42:02 +0000 (19:42 -0300)
committerGitHub <noreply@github.com>
Mon, 24 Apr 2023 22:42:02 +0000 (22:42 +0000)
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>
Misc/NEWS.d/next/Core and Builtins/2023-04-24-21-47-38.gh-issue-103801.WaBanq.rst [new file with mode: 0644]
Tools/wasm/wasm_assets.py
Tools/wasm/wasm_build.py

diff --git a/Misc/NEWS.d/next/Core and Builtins/2023-04-24-21-47-38.gh-issue-103801.WaBanq.rst b/Misc/NEWS.d/next/Core and Builtins/2023-04-24-21-47-38.gh-issue-103801.WaBanq.rst
new file mode 100644 (file)
index 0000000..6f07d72
--- /dev/null
@@ -0,0 +1 @@
+Adds three minor linting fixes to the wasm module caught that were caught by ruff.
index 9dc8bda4017e2caf602afa5a7f6b528563446b6d..1fc97fd5e70a10cc89805bc0aca1bbdd887374df 100755 (executable)
@@ -6,7 +6,8 @@ contains:
 
 - 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
index 493682c5b138a3dc3ff6e5976b5209de28c4c259..241a5d4eed5ae840fcb62ef4743ac90045a214d2 100755 (executable)
@@ -73,7 +73,7 @@ Builds require a clean source directory. Please use a clean checkout or
 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.
 
@@ -598,7 +598,7 @@ class BuildProfile:
         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)