From 2d55ddf7fe87333498cfaf2c2e404e58b891f404 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 21:08:23 +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/astral-sh/ruff-pre-commit: v0.15.22 → v0.16.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.22...v0.16.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d010574..6e40f48 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.22 + rev: v0.16.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From af42363bcf9a7499ee6cd67e679a3efd7aea81e1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 21:08:58 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pytest_httpserver/blocking_httpserver.py | 2 +- pytest_httpserver/httpserver.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pytest_httpserver/blocking_httpserver.py b/pytest_httpserver/blocking_httpserver.py index 096e9e4..cb42795 100644 --- a/pytest_httpserver/blocking_httpserver.py +++ b/pytest_httpserver/blocking_httpserver.py @@ -76,7 +76,7 @@ def assert_request( data: str | bytes | None = None, data_encoding: str = "utf-8", headers: Mapping[str, str] | None = None, - query_string: None | QueryMatcher | str | bytes | Mapping[str, str] = None, + query_string: QueryMatcher | str | bytes | Mapping[str, str] | None = None, header_value_matcher: HeaderValueMatcher | None = None, json: Any = UNDEFINED, timeout: int = 30, diff --git a/pytest_httpserver/httpserver.py b/pytest_httpserver/httpserver.py index 110c428..00ca613 100644 --- a/pytest_httpserver/httpserver.py +++ b/pytest_httpserver/httpserver.py @@ -265,7 +265,7 @@ def get_comparing_values(self, request_query_string: bytes) -> tuple[bool, bool] return (True, False) -def _create_query_matcher(query_string: None | QueryMatcher | str | bytes | Mapping[str, str]) -> QueryMatcher: +def _create_query_matcher(query_string: QueryMatcher | str | bytes | Mapping[str, str] | None) -> QueryMatcher: if isinstance(query_string, QueryMatcher): return query_string @@ -300,7 +300,7 @@ class RequestMatcherKwargs(TypedDict, total=False): data: str | bytes | None data_encoding: str headers: Mapping[str, str] | None - query_string: None | QueryMatcher | str | bytes | Mapping[str, str] + query_string: QueryMatcher | str | bytes | Mapping[str, str] | None header_value_matcher: HVMATCHER_T | None json: Any @@ -341,7 +341,7 @@ def __init__( data: str | bytes | None = None, data_encoding: str = "utf-8", headers: Mapping[str, str] | None = None, - query_string: None | QueryMatcher | str | bytes | Mapping[str, str] = None, + query_string: QueryMatcher | str | bytes | Mapping[str, str] | None = None, header_value_matcher: HVMATCHER_T | None = None, json: Any = UNDEFINED, ) -> None: @@ -1068,7 +1068,7 @@ def expect_request( data: str | bytes | None = None, data_encoding: str = "utf-8", headers: Mapping[str, str] | None = None, - query_string: None | QueryMatcher | str | bytes | Mapping[str, str] = None, + query_string: QueryMatcher | str | bytes | Mapping[str, str] | None = None, header_value_matcher: HVMATCHER_T | None = None, handler_type: HandlerType = HandlerType.PERMANENT, json: Any = UNDEFINED, @@ -1151,7 +1151,7 @@ def expect_oneshot_request( data: str | bytes | None = None, data_encoding: str = "utf-8", headers: Mapping[str, str] | None = None, - query_string: None | QueryMatcher | str | bytes | Mapping[str, str] = None, + query_string: QueryMatcher | str | bytes | Mapping[str, str] | None = None, header_value_matcher: HVMATCHER_T | None = None, json: Any = UNDEFINED, ) -> RequestHandler: @@ -1206,7 +1206,7 @@ def expect_ordered_request( data: str | bytes | None = None, data_encoding: str = "utf-8", headers: Mapping[str, str] | None = None, - query_string: None | QueryMatcher | str | bytes | Mapping[str, str] = None, + query_string: QueryMatcher | str | bytes | Mapping[str, str] | None = None, header_value_matcher: HVMATCHER_T | None = None, json: Any = UNDEFINED, ) -> RequestHandler: