diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 72809fc1..d7b77415 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: # Autoformat: Python code, syntax patterns are modernized - repo: https://github.com/asottile/pyupgrade - rev: v3.19.0 + rev: v3.20.0 hooks: - id: pyupgrade args: @@ -28,13 +28,13 @@ repos: # Autoformat: Python code - repo: https://github.com/pycqa/isort - rev: 5.13.2 + rev: 6.0.1 hooks: - id: isort # Autoformat: Python code - repo: https://github.com/psf/black - rev: 24.10.0 + rev: 25.1.0 hooks: - id: black exclude: "contrib\/template\/.*" @@ -65,7 +65,7 @@ repos: # Lint: Python code - repo: https://github.com/PyCQA/flake8 - rev: "7.1.1" + rev: "7.3.0" hooks: - id: flake8 diff --git a/docs/source/server-process.md b/docs/source/server-process.md index 1f59f335..8ea00e87 100644 --- a/docs/source/server-process.md +++ b/docs/source/server-process.md @@ -23,7 +23,6 @@ One of: - A list of strings that is the command used to start the process. The following template strings will be replaced: - - `{port}` the port that the process should listen on. This will be 0 if it should use a Unix socket instead. - `{unix_socket}` the path at which the process should listen on a Unix diff --git a/labextension/yarn.lock b/labextension/yarn.lock index 3b4ed78b..f40ae054 100644 --- a/labextension/yarn.lock +++ b/labextension/yarn.lock @@ -4453,11 +4453,10 @@ __metadata: "typescript@patch:typescript@~5.2.2#~builtin": version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=f3b441" + resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=85af82" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 0f4da2f15e6f1245e49db15801dbee52f2bbfb267e1c39225afdab5afee1a72839cd86000e65ee9d7e4dfaff12239d28beaf5ee431357fcced15fb08583d72ca languageName: node linkType: hard diff --git a/tests/test_proxies.py b/tests/test_proxies.py index 4573517c..45f6418f 100644 --- a/tests/test_proxies.py +++ b/tests/test_proxies.py @@ -146,7 +146,7 @@ def test_chained_rewrite_response(a_server_port_and_token: Tuple[int, str]) -> N def test_cats_and_dogs_rewrite_response( - a_server_port_and_token: Tuple[int, str] + a_server_port_and_token: Tuple[int, str], ) -> None: PORT, TOKEN = a_server_port_and_token r = request_get(PORT, "/python-cats-only-rewrite-response/goats", TOKEN) @@ -197,7 +197,7 @@ def test_server_proxy_requested_port(a_server_port_and_token: Tuple[int, str]) - def test_server_proxy_on_requested_port_no_command( - a_server_port_and_token: Tuple[int, str] + a_server_port_and_token: Tuple[int, str], ) -> None: PORT, TOKEN = a_server_port_and_token r = request_get(PORT, "/python-proxyto54321-no-command/ghi", TOKEN) @@ -212,7 +212,7 @@ def test_server_proxy_on_requested_port_no_command( def test_server_proxy_port_non_absolute( - a_server_port_and_token: Tuple[int, str] + a_server_port_and_token: Tuple[int, str], ) -> None: PORT, TOKEN = a_server_port_and_token r = request_get(PORT, "/proxy/54321/jkl", TOKEN) @@ -234,7 +234,7 @@ def test_server_proxy_port_absolute(a_server_port_and_token: Tuple[int, str]) -> def test_server_proxy_host_non_absolute( - a_server_port_and_token: Tuple[int, str] + a_server_port_and_token: Tuple[int, str], ) -> None: PORT, TOKEN = a_server_port_and_token # note: localhost: is stripped but 127.0.0.1: is not @@ -268,7 +268,7 @@ def test_server_proxy_host_invalid( def test_server_proxy_port_non_service_rewrite_response( - a_server_port_and_token: Tuple[int, str] + a_server_port_and_token: Tuple[int, str], ) -> None: PORT, TOKEN = a_server_port_and_token @@ -334,7 +334,7 @@ def test_server_request_headers(a_server_port_and_token: Tuple[int, str]) -> Non def test_server_content_encoding_header( - a_server_port_and_token: Tuple[int, str] + a_server_port_and_token: Tuple[int, str], ) -> None: PORT, TOKEN = a_server_port_and_token r = request_get(PORT, "/python-gzipserver/", TOKEN, host="127.0.0.1") @@ -359,7 +359,7 @@ async def test_eventstream(a_server_port_and_token: Tuple[int, str]) -> None: stream_data = [] def streaming_cb(data): - nonlocal times_called, last_cb_time, stream_read_intervals + nonlocal times_called, last_cb_time time_taken = time.perf_counter() - last_cb_time last_cb_time = time.perf_counter() stream_read_intervals.append(time_taken) @@ -379,7 +379,7 @@ def streaming_cb(data): async def test_server_proxy_websocket_messages( - a_server_port_and_token: Tuple[int, str] + a_server_port_and_token: Tuple[int, str], ) -> None: PORT, TOKEN = a_server_port_and_token url = f"ws://{LOCALHOST}:{PORT}/python-websocket/echosocket?token={TOKEN}" @@ -465,7 +465,7 @@ async def test_server_proxy_websocket_subprotocols( async def test_websocket_no_auth_failure( - a_server_port_and_token: Tuple[int, str] + a_server_port_and_token: Tuple[int, str], ) -> None: PORT = a_server_port_and_token[0] # Intentionally do not pass an appropriate token, which should cause a 403 @@ -499,7 +499,7 @@ def test_bad_server_proxy_url( def test_callable_environment_formatting( - a_server_port_and_token: Tuple[int, str] + a_server_port_and_token: Tuple[int, str], ) -> None: PORT, TOKEN = a_server_port_and_token r = request_get(PORT, "/python-http-callable-env/test", TOKEN)