Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 11, 2024
1 parent 7a2a88a commit 5fe7f6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ Calling `.clean(key)` on default dataloader with non-existing `key` will not thr
async def load_data(keys):
return [str(key) for key in keys]


dataloader = DataLoader(load_fn=load_data)
dataloader.clean(42) # does not throw KeyError anymore
dataloader.clean(42) # does not throw KeyError anymore
```

This is a patch release, so no breaking changes.
This is a patch release, so no breaking changes.
2 changes: 1 addition & 1 deletion tests/test_dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ async def idx(keys: List[int]) -> List[Tuple[int, int]]:

loader = DataLoader(load_fn=idx, cache=False)

loader.clean(1) # no effect on non-cached values
loader.clean(1) # no effect on non-cached values

assert await loader.load_many([1, 2, 3]) == [(1, 1), (2, 1), (3, 1)]

Expand Down

0 comments on commit 5fe7f6f

Please sign in to comment.