]> 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:

Fix various import issues
authorTomas Babej <tomasbabej@gmail.com>
Sat, 8 Aug 2015 23:32:49 +0000 (01:32 +0200)
committerTomas Babej <tomasbabej@gmail.com>
Sun, 9 Aug 2015 00:25:21 +0000 (02:25 +0200)
tasklib/backends.py
tasklib/filters.py
tasklib/serializing.py
tasklib/task.py
tasklib/tests.py

index 3b14ec0cfd5606d16b3528e1a18dfcf6f7d4e271..edf9ac3eeca32526b95ae3dc8e837dc87fd9c830 100644 (file)
@@ -1,12 +1,14 @@
 import abc
+import datetime
 import json
 import os
 import re
+import six
 import subprocess
 
-from tasklib.task import TaskQuerySet
-from tasklib.filters import TaskWarriorFilter
-from tasklib.serializing import local_zone
+from .task import Task, TaskQuerySet
+from .filters import TaskWarriorFilter
+from .serializing import local_zone
 
 DATE_FORMAT_CALC = '%Y-%m-%dT%H:%M:%S'
 
index 7b44e9858b93bb46bb14c1308aaed07ba1935497..0a74c3c7582e669c07e0ac1eb3107504b63bdf22 100644 (file)
@@ -1,5 +1,6 @@
 import abc
-from tasklib.serializing import SerializingObject
+import six
+from .serializing import SerializingObject
 
 
 class TaskFilter(object):
index e980c587f7925e6922041541841a4dd0015cf3b5..ee04d38d2c178d0203763e3962eb50a8b3edf7f4 100644 (file)
@@ -1,3 +1,4 @@
+import datetime
 import json
 import pytz
 import six
index e343583b203b44ec9c7920c065eca4927c4ff93d..18acfe58995203db2efbdf80c397055821046274 100644 (file)
@@ -1,14 +1,14 @@
 from __future__ import print_function
 import copy
 import datetime
+import importlib
 import json
 import logging
 import os
 import six
 import sys
 
-from backends import TaskWarrior, TaskWarriorException
-from serializing import SerializingObject
+from .serializing import SerializingObject
 
 DATE_FORMAT = '%Y%m%dT%H%M%SZ'
 REPR_OUTPUT_SIZE = 10
@@ -225,8 +225,9 @@ class Task(TaskResource):
 
         # Create the TaskWarrior instance if none passed
         if warrior is None:
+            backends = importlib.import_module('.backends')
             hook_parent_dir = os.path.dirname(os.path.dirname(sys.argv[0]))
-            warrior = TaskWarrior(data_location=hook_parent_dir)
+            warrior = backends.TaskWarrior(data_location=hook_parent_dir)
 
         # TaskWarrior instance is set to None
         task = cls(warrior)
index af79fae4b8dce3fdf8846feb9d593c147832dde1..0dee2d2f4489857e9ba87ed13812001578c86c7f 100644 (file)
@@ -11,7 +11,9 @@ import sys
 import tempfile
 import unittest
 
-from .task import TaskWarrior, Task, ReadOnlyDictView, local_zone, DATE_FORMAT
+from .backends import TaskWarrior
+from .task import Task, ReadOnlyDictView
+from .serializing import DATE_FORMAT, local_zone
 
 # http://taskwarrior.org/docs/design/task.html , Section: The Attributes
 TASK_STANDARD_ATTRS = (