diff --git a/simvue/run.py b/simvue/run.py index 37d63464..3ca3dae4 100644 --- a/simvue/run.py +++ b/simvue/run.py @@ -22,6 +22,7 @@ import sys import traceback as tb import time +import types import functools import platform import typing @@ -234,9 +235,9 @@ def __enter__(self) -> Self: def _handle_exception_throw( self, - exc_type: typing.Type[BaseException] | None, - value: BaseException, - traceback: typing.Type[BaseException] | BaseException | None, + exc_type: type[BaseException] | None, + value: BaseException | None, + traceback: types.TracebackType | None, ) -> None: _exception_thrown: str | None = exc_type.__name__ if exc_type else None _is_running: bool = self._status == "running" @@ -272,9 +273,9 @@ def _handle_exception_throw( def __exit__( self, - exc_type: typing.Type[BaseException] | None, - value: BaseException, - traceback: typing.Type[BaseException] | BaseException | None, + exc_type: type[BaseException] | None, + value: BaseException | None, + traceback: types.TracebackType | None, ) -> None: logger.debug( "Automatically closing run '%s' in status %s",