Clarify live storage collection semantics

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2026-08-18 23:36:41 +08:00
parent 8dd2c53d7b
commit fdcf282949
5 changed files with 5 additions and 9 deletions
+1 -1
View File
@@ -35,5 +35,5 @@ class StorageBackend(ABC):
@abstractmethod
def data(self) -> Any:
"""Return the data managed by the storage factory."""
"""Return the live mutable data managed by the storage factory."""
raise NotImplementedError
+1 -2
View File
@@ -61,8 +61,7 @@ class UserRoutings(Mixins.CleanupOnExit, StorageBackend):
)
def data(self) -> dict[str, dict]:
# Shallow copy
"""Return the data managed by the user routings."""
"""Return the live mutable collection managed by this repository."""
return self._data
def cleanup(self):
+1 -2
View File
@@ -166,8 +166,7 @@ class UserServers(Mixins.CleanupOnExit, StorageBackend):
)
def data(self) -> list[ServerProfile]:
# Shallow copy
"""Return the data managed by the user servers."""
"""Return the live mutable collection managed by this repository."""
return self._list
def cleanup(self):
+1 -2
View File
@@ -178,8 +178,7 @@ class UserSubs(Mixins.CleanupOnExit, StorageBackend):
)
def data(self) -> dict[str, dict]:
# Shallow copy
"""Return the data managed by the user subs."""
"""Return the live mutable collection managed by this repository."""
return self._data
def groups(self) -> tuple[SubscriptionGroup, ...]:
+1 -2
View File
@@ -58,8 +58,7 @@ class UserTUNSettings(Mixins.CleanupOnExit, StorageBackend):
)
def data(self) -> dict[str, str]:
# Shallow copy
"""Return the data managed by the user TUN settings."""
"""Return the live mutable collection managed by this repository."""
return self._data
def cleanup(self):