Skip to content

Commit e48f354

Browse files
committed
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.
1 parent d681e3e commit e48f354

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nextflow/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class Execution:
2727
stdout: str
2828
stderr: str
2929
return_code: str
30-
started: datetime
31-
finished: datetime
30+
started: datetime | None
31+
finished: datetime | None
3232
command: str
3333
log: str
3434
path: str
@@ -74,8 +74,8 @@ class ProcessExecution:
7474
return_code: str
7575
bash: str
7676
submitted: datetime
77-
started: datetime
78-
finished: datetime
77+
started: datetime | None
78+
finished: datetime | None
7979
status: str
8080
cached: bool
8181
io: Any

0 commit comments

Comments
 (0)