X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/751f8d376a042c6148e8c161f813ebd967c24e52..bdd4d32840e153c25649dcec4a692836fe7b4e75:/tasklib/serializing.py?ds=sidebyside 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 - -