Enable strict typing on script helper (#122075)

This commit is contained in:
Erik Montnemery
2024-07-17 13:51:59 +02:00
committed by GitHub
parent a0f91d27a3
commit efb7bede40
4 changed files with 76 additions and 40 deletions

View File

@@ -34,7 +34,7 @@ class TraceElement:
"""Container for trace data."""
self._child_key: str | None = None
self._child_run_id: str | None = None
self._error: Exception | None = None
self._error: BaseException | None = None
self.path: str = path
self._result: dict[str, Any] | None = None
self.reuse_by_child = False
@@ -52,7 +52,7 @@ class TraceElement:
self._child_key = child_key
self._child_run_id = child_run_id
def set_error(self, ex: Exception) -> None:
def set_error(self, ex: BaseException | None) -> None:
"""Set error."""
self._error = ex