From fabdfc6ab69d17c0f60f0f052eee5ac266dd0e35 Mon Sep 17 00:00:00 2001 From: Zakhar Izmaylov Date: Wed, 29 Jan 2025 07:16:21 +0300 Subject: [PATCH] Improve type hinting for database backup function Update return type annotation for `_create_database_backup()` to use explicit tuple type syntax, enhancing type clarity and compatibility with modern Python type hinting practices. --- backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.py b/backup.py index 51c6636b..c0d5ffe0 100644 --- a/backup.py +++ b/backup.py @@ -29,7 +29,7 @@ async def backup_database() -> Exception | None: return e -def _create_database_backup() -> (str | None, Exception | None): +def _create_database_backup() -> tuple[str | None, Exception | None]: date_formatted = datetime.now().strftime("%Y-%m-%d-%H%M%S") if not os.path.exists(BACK_DIR):