From 158b5417c4b505faaf2416602a45b248328e9cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Thu, 1 Dec 2022 22:01:12 +0100 Subject: [PATCH] Upgrade ruff --- .pre-commit-config.yaml | 4 ++-- src/runboat/utils.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9bc1bc2..0fa93cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/src/runboat/utils.py b/src/runboat/utils.py index c61ab06..c17a6c4 100644 --- a/src/runboat/utils.py +++ b/src/runboat/utils.py @@ -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]: