diff options
author | Frederick Yin <fkfd@fkfd.me> | 2021-10-26 21:55:39 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2021-10-26 21:55:39 +0800 |
commit | cbf419cb79f4a0d06c65167f81f10f503fff391d (patch) | |
tree | 80d995bb7b1d0ee779ade2fc64de01ca641b3faf | |
parent | da7ec241f13f4fb2b422dd15f87942cacc1659e0 (diff) |
Wrap static methods in Database in decorator
-rw-r--r-- | jimbrella/database.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/jimbrella/database.py b/jimbrella/database.py index d672653..37f6c82 100644 --- a/jimbrella/database.py +++ b/jimbrella/database.py @@ -258,6 +258,7 @@ class Database: return self._update(umb) + @staticmethod def group_by_status(umbrellas) -> dict: """(static method) Returns umbrellas grouped into a dict by their status.""" keys = set([umb["status"] for umb in umbrellas]) @@ -267,6 +268,7 @@ class Database: statuses[key] = [umb for umb in umbrellas if umb["status"] == key] return statuses + @staticmethod def find_overdue(umbrellas) -> list: """(static method) Returns umbrellas in possession of their tenant for too long.""" now = datetime.now() |