From e48f354fa6827dedcb6ff0acd795386ec3d911bf Mon Sep 17 00:00:00 2001 From: Martin Husbyn Date: Thu, 19 Jun 2025 17:33:59 +0100 Subject: [PATCH] refactor(models.Execution): add none as a type option for `started` and `finished` fields These were previously only typed as `datetime`. This caught me out, as I got a runtime error where they were None. Adding the type hint should hopefully help others avoiding the same mistake. --- nextflow/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nextflow/models.py b/nextflow/models.py index e0a6449..d21a4a8 100644 --- a/nextflow/models.py +++ b/nextflow/models.py @@ -27,8 +27,8 @@ class Execution: stdout: str stderr: str return_code: str - started: datetime - finished: datetime + started: datetime | None + finished: datetime | None command: str log: str path: str @@ -74,8 +74,8 @@ class ProcessExecution: return_code: str bash: str submitted: datetime - started: datetime - finished: datetime + started: datetime | None + finished: datetime | None status: str cached: bool io: Any