From 3f26d4776e6e0ecb31720a6fb68cc6ebfee4f36c Mon Sep 17 00:00:00 2001 From: timeshifter Date: Fri, 26 Nov 2021 13:46:48 +0100 Subject: [PATCH] cleanup, black --- zfs-backup.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/zfs-backup.py b/zfs-backup.py index 36186b1..91b66f2 100755 --- a/zfs-backup.py +++ b/zfs-backup.py @@ -105,10 +105,6 @@ class ZFSPath: def replace_pool(self, pool: str) -> ZFSPath: return ZFSPath([pool] + self._elements[1:], self.snapname) - # @property - # def pool_name(self) -> str: - # return self._elements[0] - # @property def name_without_pool(self) -> str: name = "/".join(self._elements[1:]) @@ -380,7 +376,9 @@ class Dataset: def _clean_old_snapshots_for_interval(self, interval: str, max_count: int): regex = ".*".join(["", config.snapshot_tag, interval, ""]) - snapshots = [snapshot for snapshot in self.snapshots if snapshot.matches_regex(regex)] + snapshots = [ + snapshot for snapshot in self.snapshots if snapshot.matches_regex(regex) + ] if len(snapshots) > max_count: snapshots.sort() for snap in snapshots[:-max_count]: