Skip to content

Commit af42363

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2d55ddf commit af42363

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

pytest_httpserver/blocking_httpserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def assert_request(
7676
data: str | bytes | None = None,
7777
data_encoding: str = "utf-8",
7878
headers: Mapping[str, str] | None = None,
79-
query_string: None | QueryMatcher | str | bytes | Mapping[str, str] = None,
79+
query_string: QueryMatcher | str | bytes | Mapping[str, str] | None = None,
8080
header_value_matcher: HeaderValueMatcher | None = None,
8181
json: Any = UNDEFINED,
8282
timeout: int = 30,

pytest_httpserver/httpserver.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def get_comparing_values(self, request_query_string: bytes) -> tuple[bool, bool]
265265
return (True, False)
266266

267267

268-
def _create_query_matcher(query_string: None | QueryMatcher | str | bytes | Mapping[str, str]) -> QueryMatcher:
268+
def _create_query_matcher(query_string: QueryMatcher | str | bytes | Mapping[str, str] | None) -> QueryMatcher:
269269
if isinstance(query_string, QueryMatcher):
270270
return query_string
271271

@@ -300,7 +300,7 @@ class RequestMatcherKwargs(TypedDict, total=False):
300300
data: str | bytes | None
301301
data_encoding: str
302302
headers: Mapping[str, str] | None
303-
query_string: None | QueryMatcher | str | bytes | Mapping[str, str]
303+
query_string: QueryMatcher | str | bytes | Mapping[str, str] | None
304304
header_value_matcher: HVMATCHER_T | None
305305
json: Any
306306

@@ -341,7 +341,7 @@ def __init__(
341341
data: str | bytes | None = None,
342342
data_encoding: str = "utf-8",
343343
headers: Mapping[str, str] | None = None,
344-
query_string: None | QueryMatcher | str | bytes | Mapping[str, str] = None,
344+
query_string: QueryMatcher | str | bytes | Mapping[str, str] | None = None,
345345
header_value_matcher: HVMATCHER_T | None = None,
346346
json: Any = UNDEFINED,
347347
) -> None:
@@ -1068,7 +1068,7 @@ def expect_request(
10681068
data: str | bytes | None = None,
10691069
data_encoding: str = "utf-8",
10701070
headers: Mapping[str, str] | None = None,
1071-
query_string: None | QueryMatcher | str | bytes | Mapping[str, str] = None,
1071+
query_string: QueryMatcher | str | bytes | Mapping[str, str] | None = None,
10721072
header_value_matcher: HVMATCHER_T | None = None,
10731073
handler_type: HandlerType = HandlerType.PERMANENT,
10741074
json: Any = UNDEFINED,
@@ -1151,7 +1151,7 @@ def expect_oneshot_request(
11511151
data: str | bytes | None = None,
11521152
data_encoding: str = "utf-8",
11531153
headers: Mapping[str, str] | None = None,
1154-
query_string: None | QueryMatcher | str | bytes | Mapping[str, str] = None,
1154+
query_string: QueryMatcher | str | bytes | Mapping[str, str] | None = None,
11551155
header_value_matcher: HVMATCHER_T | None = None,
11561156
json: Any = UNDEFINED,
11571157
) -> RequestHandler:
@@ -1206,7 +1206,7 @@ def expect_ordered_request(
12061206
data: str | bytes | None = None,
12071207
data_encoding: str = "utf-8",
12081208
headers: Mapping[str, str] | None = None,
1209-
query_string: None | QueryMatcher | str | bytes | Mapping[str, str] = None,
1209+
query_string: QueryMatcher | str | bytes | Mapping[str, str] | None = None,
12101210
header_value_matcher: HVMATCHER_T | None = None,
12111211
json: Any = UNDEFINED,
12121212
) -> RequestHandler:

0 commit comments

Comments
 (0)