[3.13] GH-139590: Run ruff format on pre-commit for Tools/wasm (GH-139591) (#139745)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
Savannah Ostrowski 2025-10-08 08:10:25 -07:00 committed by GitHub
parent de84a03099
commit 5a98f85c9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 246 additions and 121 deletions

View file

@ -6,20 +6,24 @@
description="Start a local webserver with a Python terminal."
)
parser.add_argument(
"--port", type=int, default=8000, help="port for the http server to listen on"
"--port",
type=int,
default=8000,
help="port for the http server to listen on",
)
parser.add_argument(
"--bind", type=str, default="127.0.0.1", help="Bind address (empty for all)"
"--bind",
type=str,
default="127.0.0.1",
help="Bind address (empty for all)",
)
class MyHTTPRequestHandler(server.SimpleHTTPRequestHandler):
extensions_map = server.SimpleHTTPRequestHandler.extensions_map.copy()
extensions_map.update(
{
".wasm": "application/wasm",
}
)
extensions_map.update({
".wasm": "application/wasm",
})
def end_headers(self) -> None:
self.send_my_headers()
@ -42,5 +46,6 @@ def main() -> None:
bind=args.bind,
)
if __name__ == "__main__":
main()