]> git.madduck.net Git - etc/taskwarrior.git/blobdiff - tasklib/task.py

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:

tests: Add tests to filter by attributes and their empty values
[etc/taskwarrior.git] / tasklib / task.py
index 09535881550207dff67ed436f1a438f15b7a5949..170fc77e545bf076a5d1d6d6ed6977178fc2fe34 100644 (file)
@@ -95,9 +95,13 @@ class Task(TaskResource):
         """
         pass
 
-    def __init__(self, warrior, data={}):
+    def __init__(self, warrior, data={}, **kwargs):
         self.warrior = warrior
-        self._load_data(data)
+
+        # We keep data for backwards compatibility
+        kwargs.update(data)
+
+        self._load_data(kwargs)
         self._modified_fields = set()
 
     def __unicode__(self):