Skip to content
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion pytest_httpserver/blocking_httpserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 6 additions & 6 deletions pytest_httpserver/httpserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Loading