Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #514

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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\/.*"
Expand Down
18 changes: 9 additions & 9 deletions tests/test_proxies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down