Skip to content

Commit bb1a391

Browse files
committed
tests(test_query_list): Fix mypy issue
tests/_internal/test_query_list.py:262: error: Argument 1 to "filter" of "QueryList" has incompatible type "Mapping[str, str | list[str]]"; expected "Callable[[dict[str, Any]], bool] | dict[str, Any] | None" [arg-type] tests/_internal/test_query_list.py:275: error: Argument 1 to "get" of "QueryList" has incompatible type "Mapping[str, str | list[str]] | None"; expected "Callable[[dict[str, Any]], bool] | dict[str, Any] | None" [arg-type] tests/_internal/test_query_list.py:281: error: Argument 1 to "get" of "QueryList" has incompatible type "Mapping[str, str | list[str]] | None"; expected "Callable[[dict[str, Any]], bool] | dict[str, Any] | None" [arg-type] tests/_internal/test_query_list.py:288: error: Argument 1 to "get" of "QueryList" has incompatible type "Mapping[str, str | list[str]] | None"; expected "Callable[[dict[str, Any]], bool] | dict[str, Any] | None" [arg-type]
1 parent d980d48 commit bb1a391

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/_internal/test_query_list.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import dataclasses
2-
from typing import Any, Optional, Union
2+
from typing import Any, Callable, Optional, Union
33

44
import pytest
55

@@ -250,7 +250,7 @@ class Obj:
250250
)
251251
def test_filter(
252252
items: list[dict[str, Any]],
253-
filter_expr: Optional[dict[str, Union[str, list[str]]]],
253+
filter_expr: Optional[Union[Callable[[Any], bool], Any]],
254254
expected_result: Union[QueryList[Any], list[dict[str, Any]]],
255255
) -> None:
256256
qs = QueryList(items)

0 commit comments

Comments
 (0)