diff --git a/CHANGES b/CHANGES index 3bc35e09..66bc5f17 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ 0.26.3 ------ +* Fixed the element type exposed by `CallList` so static type checkers infer + `Call` values when iterating, indexing, or filtering recorded calls. See #722 * Fixed `query_string_matcher` (and the query matching auto-applied to a registered URL's own query string) discarding blank-valued query params (``b=``), which caused requests with an extra or missing blank param to diff --git a/responses/__init__.py b/responses/__init__.py index 48ce6580..41f5fde8 100644 --- a/responses/__init__.py +++ b/responses/__init__.py @@ -234,7 +234,7 @@ def wrapper(*args: Any, **kwargs: Any) -> Any: # type: ignore[misc] return wrapper -class CallList(Sequence[Any], Sized): +class CallList(Sequence[Call], Sized): def __init__(self) -> None: self._calls: List[Call] = []