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.
This commit is contained in:
Zakhar Izmaylov
2025-01-29 07:16:21 +03:00
parent b1739cf4ea
commit fabdfc6ab6
+1 -1
View File
@@ -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):