mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Avoid using mutable class attributes
A tuple works fine here.
This commit is contained in:
parent
ffe883a2f1
commit
ed88406aec
5 changed files with 5 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ class DAVStorage(Storage):
|
|||
|
||||
connector: aiohttp.TCPConnector
|
||||
|
||||
_repr_attributes = ["username", "url"]
|
||||
_repr_attributes = ("username", "url")
|
||||
|
||||
_property_table = {
|
||||
"displayname": ("displayname", "DAV:"),
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
class FilesystemStorage(Storage):
|
||||
storage_name = "filesystem"
|
||||
_repr_attributes = ["path"]
|
||||
_repr_attributes = ("path",)
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue