Skip to content

Commit 4bb25cd

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 e6e53ba commit 4bb25cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/_internal/test_query_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class Obj:
251251
)
252252
def test_filter(
253253
items: list[dict[str, Any]],
254-
filter_expr: Optional[t.Mapping[str, Union[str, list[str]]]],
254+
filter_expr: Optional[t.Optional[t.Union[t.Callable[[Any], bool], Any]]],
255255
expected_result: Union[QueryList[Any], list[dict[str, Any]]],
256256
) -> None:
257257
qs = QueryList(items)

0 commit comments

Comments
 (0)