From 587cc9c6bc3ae107444437091b9515d98abb25b2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 23:58:28 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.19.0 → v3.19.1](https://github.com/asottile/pyupgrade/compare/v3.19.0...v3.19.1) - [github.com/pycqa/isort: 5.13.2 → 6.0.0](https://github.com/pycqa/isort/compare/5.13.2...6.0.0) - [github.com/psf/black: 24.10.0 → 25.1.0](https://github.com/psf/black/compare/24.10.0...25.1.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 72809fc1..b2f06441 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.19.1 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.0 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\/.*" From 9cbb6a074b250d08c665d85d0e8e071ce7a711ea Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 23:59:27 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/test_proxies.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/test_proxies.py b/tests/test_proxies.py index 4573517c..f6332a36 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") @@ -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)