From 6daab95f5f020c2f404974e0317e186679101e5c Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Sat, 16 Mar 2019 07:52:15 -0700 Subject: [PATCH] Minor docstring revision --- rbackup/hierarchy/repository.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/rbackup/hierarchy/repository.py b/rbackup/hierarchy/repository.py index 72bd007..89c1009 100644 --- a/rbackup/hierarchy/repository.py +++ b/rbackup/hierarchy/repository.py @@ -79,6 +79,20 @@ class Repository(Hierarchy): """ return self._snapshots + @property + def empty(self): + """Determine whether or not this Repository is empty. + + Example + ------- + >>> repo = Repository('/tmp') + >>> repo.empty + True + + :rtype: bool + """ + return self._snapshots == [] + @property def curr_snapshot(self): """Return this Repository's current snapshot. @@ -119,7 +133,6 @@ class Repository(Hierarchy): <...Snapshot ... at 0x...> :return: a new Snapshot object - :rtype: Snapshot object """ path = os.path.join(self._snapshot_dir, f"snapshot-{name}")