Skip to content

Commit

Permalink
fix: ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-friday committed Sep 7, 2024
1 parent 90fa2e6 commit 6bcee5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ ignore = [
# pydocstyle # TODO
"D100", # undocumented-public-module
"D104", # undocumented-public-package
# async
"ASYNC109", # async-function-with-timeout
]

[lint.per-file-ignores]
Expand Down
2 changes: 2 additions & 0 deletions src/timeout_executor/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import anyio
import cloudpickle
from anyio.lowlevel import checkpoint
from async_wrapper import async_to_sync, sync_to_async
from typing_extensions import ParamSpec, Self, TypeVar, override

Expand Down Expand Up @@ -73,6 +74,7 @@ async def delay(self, timeout: float | None = None) -> T:
finally:
with anyio.CancelScope(shield=True):
self._executor_args.terminator.close("async result")
await checkpoint()

async def _delay(self, timeout: float) -> T:
if self._process.returncode is not None:
Expand Down

0 comments on commit 6bcee5d

Please sign in to comment.