mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-09-27 17:37:58 +03:00
Clarify live storage collection semantics
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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, ...]:
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user