Avoid using mutable class attributes

A tuple works fine here.
This commit is contained in:
Hugo Osvaldo Barrera 2025-08-29 12:40:37 +02:00
parent ffe883a2f1
commit ed88406aec
5 changed files with 5 additions and 5 deletions

View file

@ -75,7 +75,7 @@ class Storage(metaclass=StorageMeta):
read_only = False
# The attribute values to show in the representation of the storage.
_repr_attributes: list[str] = []
_repr_attributes: tuple[str, ...] = ()
def __init__(
self,

View file

@ -451,7 +451,7 @@ class DAVStorage(Storage):
connector: aiohttp.TCPConnector
_repr_attributes = ["username", "url"]
_repr_attributes = ("username", "url")
_property_table = {
"displayname": ("displayname", "DAV:"),

View file

@ -22,7 +22,7 @@ logger = logging.getLogger(__name__)
class FilesystemStorage(Storage):
storage_name = "filesystem"
_repr_attributes = ["path"]
_repr_attributes = ("path",)
def __init__(
self,

View file

@ -23,7 +23,7 @@ logger = logging.getLogger(__name__)
class HttpStorage(Storage):
storage_name = "http"
read_only = True
_repr_attributes = ["username", "url"]
_repr_attributes = ("username", "url")
_items = None
# Required for tests.

View file

@ -40,7 +40,7 @@ def _writing_op(f):
class SingleFileStorage(Storage):
storage_name = "singlefile"
_repr_attributes = ["path"]
_repr_attributes = ("path",)
_write_mode = "wb"
_append_mode = "ab"