]> git.madduck.net Git - etc/taskwarrior.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

ReadOnlyDictView: Add methods for better representation of the ReadOnlyDictView
authorTomas Babej <tomasbabej@gmail.com>
Sat, 15 Aug 2015 12:55:04 +0000 (14:55 +0200)
committerTomas Babej <tomasbabej@gmail.com>
Sat, 15 Aug 2015 12:55:04 +0000 (14:55 +0200)
tasklib/task.py

index f30cc617cf9571b4e451b62c713c13094ae6861d..f0bb3a80904252cbf5342a45a94af7c3a22fb031 100644 (file)
@@ -38,6 +38,11 @@ class ReadOnlyDictView(object):
     def __len__(self):
         return len(self.viewed_dict)
 
+    def __unicode__(self):
+        return u'ReadOnlyDictView: {0}'.format(repr(self.viewed_dict))
+
+    __repr__ = __unicode__
+
     def get(self, key, default=None):
         return copy.deepcopy(self.viewed_dict.get(key, default))