From 75ff50042fe0c8e168159687e2e49ef0dfc3fe71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Thu, 6 Feb 2025 09:48:13 +0100 Subject: [PATCH] Change StorageType to be StrEnum class (#798) --- hass_nabucasa/files.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hass_nabucasa/files.py b/hass_nabucasa/files.py index 8ca601fd6..43e21cded 100644 --- a/hass_nabucasa/files.py +++ b/hass_nabucasa/files.py @@ -3,8 +3,9 @@ from __future__ import annotations from collections.abc import AsyncIterator, Callable, Coroutine +from enum import StrEnum import logging -from typing import TYPE_CHECKING, Any, Literal, TypedDict +from typing import TYPE_CHECKING, Any, TypedDict from aiohttp import ( ClientResponseError, @@ -18,7 +19,11 @@ _FILE_TRANSFER_TIMEOUT = 43200.0 # 43200s == 12h -type StorageType = Literal["backup"] + +class StorageType(StrEnum): + """Storage types.""" + + BACKUP = "backup" class FilesError(CloudApiError):