mypy: Remove unnecessary 'type: ignore' in google calendar.

This commit is contained in:
neiljp (Neil Pilgrim) 2017-11-15 09:10:58 -08:00 committed by Tim Abbott
parent 3e55124f4e
commit 9ed0fa9e6f

View file

@ -128,7 +128,7 @@ def populate_events():
event_timezone = pytz.timezone(event["start"]["timeZone"]) event_timezone = pytz.timezone(event["start"]["timeZone"])
# pytz timezones include an extra localize method that's not part # pytz timezones include an extra localize method that's not part
# of the tzinfo base class. # of the tzinfo base class.
start = event_timezone.localize(start) # type: ignore start = event_timezone.localize(start)
except KeyError: except KeyError:
# All-day events can have only a date. # All-day events can have only a date.
start_naive = dateutil.parser.parse(event["start"]["date"]) start_naive = dateutil.parser.parse(event["start"]["date"])
@ -138,7 +138,7 @@ def populate_events():
calendar_timezone = pytz.timezone(feed["timeZone"]) calendar_timezone = pytz.timezone(feed["timeZone"])
# pytz timezones include an extra localize method that's not part # pytz timezones include an extra localize method that's not part
# of the tzinfo base class. # of the tzinfo base class.
start = calendar_timezone.localize(start_naive) # type: ignore start = calendar_timezone.localize(start_naive)
try: try:
events.append((event["id"], start, event["summary"])) events.append((event["id"], start, event["summary"]))