summaryrefslogtreecommitdiffstats
path: root/ranger/container/tags.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/container/tags.py')
-rw-r--r--ranger/container/tags.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/ranger/container/tags.py b/ranger/container/tags.py
index 7ecef603..098ae9e3 100644
--- a/ranger/container/tags.py
+++ b/ranger/container/tags.py
@@ -109,3 +109,40 @@ class Tags(object):
def __nonzero__(self):
return True
__bool__ = __nonzero__
+
+
+class TagsDummy(Tags):
+ """A dummy Tags class for use with `ranger --clean`.
+
+ It acts like there are no tags and avoids writing any changes.
+ """
+
+ def __init__(self, filename):
+ self.tags = dict()
+
+ def __contains__(self, item):
+ return False
+
+ def add(self, *items, **others):
+ pass
+
+ def remove(self, *items, **others):
+ pass
+
+ def toggle(self, *items, **others):
+ pass
+
+ def marker(self, item):
+ return self.default_tag
+
+ def sync(self):
+ pass
+
+ def dump(self):
+ pass
+
+ def _compile(self, f):
+ pass
+
+ def _parse(self, f):
+ pass