mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[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:
parent
de84a03099
commit
5a98f85c9a
5 changed files with 246 additions and 121 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue