about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2021-08-27 20:05:49 +0200
committertoonn <toonn@toonn.io>2021-08-27 20:05:49 +0200
commit18033b2d787be1108041c3e45991622e750107f6 (patch)
tree208dac061cafa3a603e54a84d133534e3d3704b0 /ranger
parent65c19aaa04ea5c9dcac8337a55c68315270a119c (diff)
downloadranger-18033b2d787be1108041c3e45991622e750107f6.tar.gz
tags: Switch to open23 and dict literals
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/tags.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ranger/container/tags.py b/ranger/container/tags.py
index e2395897..a8bd50b4 100644
--- a/ranger/container/tags.py
+++ b/ranger/container/tags.py
@@ -81,11 +81,11 @@ class Tags(FileManagerAware):
             if exists(self._filename):
                 self.fm.notify(err, bad=True)
             else:
-                self.tags = dict()
+                self.tags = {}
 
     def dump(self):
         try:
-            with open(self._filename, 'w') as fobj:
+            with open23(self._filename, 'w') as fobj:
                 self._compile(fobj)
         except OSError as err:
             self.fm.notify(err, bad=True)
@@ -99,7 +99,7 @@ class Tags(FileManagerAware):
                 fobj.write('{0}:{1}\n'.format(tag, path))
 
     def _parse(self, fobj):
-        result = dict()
+        result = {}
         for line in fobj:
             line = line.rstrip('\n')
             if len(line) > 2 and line[1] == ':':
@@ -140,7 +140,7 @@ class TagsDummy(Tags):
     """
 
     def __init__(self, filename):  # pylint: disable=super-init-not-called
-        self.tags = dict()
+        self.tags = {}
 
     def __contains__(self, item):
         return False