Skip to content

Commit e1bcde0

Browse files
alessio-locatelliJWCook
authored andcommitted
chore: add a note regarding the type annotation and conversion
1 parent dd28ec5 commit e1bcde0

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎aiohttp_client_cache/backends/base.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def __init__(
8383
self.responses: BaseCache = DictCache()
8484

8585
self.include_headers = include_headers
86+
87+
# Converted to `set` for fast `in` checks inside `filter_ignored_params`.
8688
self.ignored_params = set(ignored_params or [])
8789

8890
@property

‎aiohttp_client_cache/cache_keys.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ def create_key(
4646
return key.hexdigest()
4747

4848

49-
def filter_ignored_params(data, ignored_params: Iterable[str]):
49+
def filter_ignored_params(
50+
data,
51+
# Always a set internally, but keep the public utility parameter as-is to avoid breaking changes.
52+
ignored_params: Iterable[str],
53+
):
5054
"""Remove any ignored params from an object, if it's dict-like"""
5155
if not isinstance(data, Mapping) or not ignored_params:
5256
return data

0 commit comments

Comments
 (0)