From 0161d65c1610632a68909064bd13537f9377fa3a Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 7 Mar 2020 18:29:35 +0300 Subject: [PATCH] lint ical --- sync_ics2gcal/ical.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sync_ics2gcal/ical.py b/sync_ics2gcal/ical.py index 10f8784..670ad75 100644 --- a/sync_ics2gcal/ical.py +++ b/sync_ics2gcal/ical.py @@ -17,7 +17,10 @@ def format_datetime_utc(value): value = datetime.datetime( value.year, value.month, value.day, tzinfo=utc) value = value.replace(microsecond=1) - return utc.normalize(value.astimezone(utc)).replace(tzinfo=None).isoformat() + 'Z' + + return utc.normalize( + value.astimezone(utc) + ).replace(tzinfo=None).isoformat() + 'Z' def gcal_date_or_dateTime(value, check_value=None): @@ -145,7 +148,9 @@ class EventConverter(Event): self._put_to_gcal( event, 'updated', self._datetime_str_prop, 'LAST-MODIFIED') self._put_to_gcal( - event, 'transparency', lambda prop: self._str_prop(prop).lower(), 'TRANSP') + event, + 'transparency', + lambda prop: self._str_prop(prop).lower(), 'TRANSP') return event @@ -160,7 +165,7 @@ class CalendarConverter(): self.calendar = calendar def load(self, filename): - """ load calendar from ics file + """ load calendar from ics file """ with open(filename, 'r', encoding='utf-8') as f: self.calendar = Calendar.from_ical(f.read())