From 70494d5f90781ea9e98dae3ae28aad55ad071f56 Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Mon, 17 Jun 2024 14:26:51 +0200 Subject: [PATCH] Docs: Correct typehint from format_process_state --- src/aiida/tools/query/formatting.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aiida/tools/query/formatting.py b/src/aiida/tools/query/formatting.py index dd93e221f9..9e2bb66bdc 100644 --- a/src/aiida/tools/query/formatting.py +++ b/src/aiida/tools/query/formatting.py @@ -11,6 +11,7 @@ from __future__ import annotations from datetime import datetime +from typing import Union from aiida.common import timezone from aiida.common.utils import str_timedelta @@ -54,7 +55,7 @@ def format_state(process_state: str, paused: bool | None = None, exit_status: in return f'{symbol} {format_process_state(process_state)}' -def format_process_state(process_state: str) -> str: +def format_process_state(process_state: Union[str, None]) -> str: """Return a string formatted representation of the given process state. :param process_state: The process state.