Skip to content

Commit

Permalink
Makes __{a}exit__ method args nullable.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterschutt committed Feb 29, 2024
1 parent 5fac5ba commit 8f1b6c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/apscheduler/_schedulers/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ async def __aenter__(self) -> Self:

async def __aexit__(
self,
exc_type: type[BaseException],
exc_val: BaseException,
exc_tb: TracebackType,
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> None:
await self.stop()
await self._exit_stack.__aexit__(exc_type, exc_val, exc_tb)
Expand Down
6 changes: 3 additions & 3 deletions src/apscheduler/_schedulers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def __enter__(self: Self) -> Self:

def __exit__(
self,
exc_type: type[BaseException],
exc_val: BaseException,
exc_tb: TracebackType,
exc_type: type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: TracebackType | None,
) -> None:
if self._exit_stack:
self._exit_stack.__exit__(exc_type, exc_val, exc_tb)
Expand Down

0 comments on commit 8f1b6c5

Please sign in to comment.