Skip to content

Commit

Permalink
Change StorageType to be StrEnum class (#798)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Feb 6, 2025
1 parent f0aa92f commit 75ff500
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions hass_nabucasa/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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):
Expand Down

0 comments on commit 75ff500

Please sign in to comment.