diff --git a/clive/__private/ui/app.py b/clive/__private/ui/app.py index 02a826abc9a3a59ea0d7ca25c2f11ff083f724ae..a4b64233a42fa5701f478253a709305df9f1abe9 100644 --- a/clive/__private/ui/app.py +++ b/clive/__private/ui/app.py @@ -1,5 +1,6 @@ from __future__ import annotations +import math from datetime import timedelta from pathlib import Path from time import sleep @@ -89,11 +90,12 @@ class Clive(App[int], ManualReactive): self, message: str, *, - title: str | None = None, + title: str = "", severity: SeverityLevel = "information", timeout: float = Notification.timeout, ) -> Notification: - title = title if title is not None else severity.capitalize() + title = title if title else severity.capitalize() + timeout = math.inf if timeout == Notification.timeout and severity == "error" else timeout return super().notify(message, title=title, severity=severity, timeout=timeout) def run(