From f2d008def446626c071a9ceb2c80acb74d477cd0 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sun, 9 Aug 2015 00:28:13 +0200 Subject: [PATCH] Move imports and constants to respective modules --- tasklib/backends.py | 3 +++ tasklib/serializing.py | 8 ++++++++ tasklib/task.py | 4 ---- 3 files changed, 11 insertions(+), 4 deletions(-) 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): -- 2.39.5