Mercurial > code > home > repos > gcalendarwatch
changeset 20:8c7af0d1b118
format
author | drewp@bigasterisk.com |
---|---|
date | Thu, 29 Oct 2020 23:48:35 -0700 |
parents | 0af075b62e4a |
children | 9eb6b4806272 |
files | .flake8 gcalendarwatch.py |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.flake8 Thu Oct 29 23:48:35 2020 -0700 @@ -0,0 +1,3 @@ +[flake8] +max-line-length=160 +ignore=E722,W503,E741,E201,E202,E241,E231
--- a/gcalendarwatch.py Thu Oct 29 23:47:02 2020 -0700 +++ b/gcalendarwatch.py Thu Oct 29 23:48:35 2020 -0700 @@ -202,8 +202,7 @@ """reads gcal, writes to mongodb""" collection: pymongo.collection.Collection - def __init__(self, conf, collection: pymongo.collection.Collection, agendaGraph: PatchableGraph, - countdownGraph: PatchableGraph): + def __init__(self, conf, collection: pymongo.collection.Collection, agendaGraph: PatchableGraph, countdownGraph: PatchableGraph): self.conf = conf self.service = getCalendarService() self.collection = collection @@ -261,9 +260,7 @@ c = EV['gcalendar'] currentRecords = list(currentRecords) self.agendaGraph.setToGraph([(s, p, o, c) for s, p, o in asGraph(limitDays(currentRecords, days=2))]) - self.countdownGraph.setToGraph([ - (s, p, o, c) for s, p, o in asGraph(filterStarred(currentRecords, maxCount=15), extraClasses=[EV['CountdownEvent']]) - ]) + self.countdownGraph.setToGraph([(s, p, o, c) for s, p, o in asGraph(filterStarred(currentRecords, maxCount=15), extraClasses=[EV['CountdownEvent']])]) class ReadMongoEvents(object): @@ -345,8 +342,8 @@ """ arg = self.get_argument t1 = parse(arg('t1')) if arg('t1', default=None) else datetime.datetime.now().replace(hour=0, minute=0, second=0) - t2 = parse(arg('t2')) if arg('t2', default=None) else datetime.datetime.now() + datetime.timedelta( - days=int(arg('days')) if arg('days', default=None) else 2) + t2 = parse(arg('t2')) if arg('t2', + default=None) else datetime.datetime.now() + datetime.timedelta(days=int(arg('days')) if arg('days', default=None) else 2) if 0: self.set_header("content-type", "application/ld+json") self.write(asJsonLd(self.settings.read.getEvents(t1, t2)))