Upgrade ruff

This commit is contained in:
Stéphane Bidoul 2022-12-01 22:01:12 +01:00
parent 9c5058d279
commit 158b5417c4
2 changed files with 4 additions and 4 deletions

View file

@ -6,13 +6,13 @@ repos:
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.132
rev: v0.0.149
hooks:
- id: ruff

View file

@ -34,8 +34,8 @@ def sync_to_async_iterator(
def async_next(iterator: Iterator[R]) -> R:
try:
return next(iterator)
except StopIteration:
raise StopAsyncIteration()
except StopIteration as e:
raise StopAsyncIteration() from e
@sync_to_async
def async_iterator_func(*args: Any, **kwargs: Any) -> Generator[R, None, None]: