From: Tomas Babej Date: Sat, 8 Aug 2015 22:28:13 +0000 (+0200) Subject: Move imports and constants to respective modules X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/f2d008def446626c071a9ceb2c80acb74d477cd0 Move imports and constants to respective modules --- diff --git a/tasklib/backends.py b/tasklib/backends.py index 2a00dee..fe24fd2 100644 --- a/tasklib/backends.py +++ b/tasklib/backends.py @@ -5,6 +5,9 @@ import re import subprocess from tasklib.filters import TaskWarriorFilter +from tasklib.serializing import local_zone + +DATE_FORMAT_CALC = '%Y-%m-%dT%H:%M:%S' VERSION_2_1_0 = six.u('2.1.0') VERSION_2_2_0 = six.u('2.2.0') diff --git a/tasklib/serializing.py b/tasklib/serializing.py index ed2881d..e980c58 100644 --- a/tasklib/serializing.py +++ b/tasklib/serializing.py @@ -1,3 +1,11 @@ +import json +import pytz +import six +import tzlocal + +DATE_FORMAT = '%Y%m%dT%H%M%SZ' +local_zone = tzlocal.get_localzone() + class SerializingObject(object): """ Common ancestor for TaskResource & TaskWarriorFilter, since they both diff --git a/tasklib/task.py b/tasklib/task.py index a24f8db..2b5ca69 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -4,22 +4,18 @@ import datetime import json import logging import os -import pytz import six import sys -import tzlocal from backends import TaskWarrior, TaskWarriorException from serializing import SerializingObject DATE_FORMAT = '%Y%m%dT%H%M%SZ' -DATE_FORMAT_CALC = '%Y-%m-%dT%H:%M:%S' REPR_OUTPUT_SIZE = 10 PENDING = 'pending' COMPLETED = 'completed' logger = logging.getLogger(__name__) -local_zone = tzlocal.get_localzone() class ReadOnlyDictView(object):