X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/0c4a107dcca0b8d22d7404e71a89355845c6ffc1..7bd2aaca03821d030f524edcddf02a2e905719c2:/tasklib/serializing.py diff --git a/tasklib/serializing.py b/tasklib/serializing.py index c177984..767f7df 100644 --- a/tasklib/serializing.py +++ b/tasklib/serializing.py @@ -8,6 +8,7 @@ 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 @@ -204,8 +205,10 @@ class SerializingObject(object): localized datetime -> localized datetime (no conversion) """ - if (isinstance(value, datetime.date) - and not isinstance(value, datetime.datetime)): + if ( + isinstance(value, datetime.date) + and not isinstance(value, datetime.datetime) + ): # Convert to local midnight value_full = datetime.datetime.combine(value, datetime.time.min) localized = local_zone.localize(value_full) @@ -233,5 +236,3 @@ class SerializingObject(object): "not: {}".format(value)) return value - -