Skip to content

Commit

Permalink
style: applied black
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Aug 30, 2022
1 parent d9421af commit 644d14c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions aw_server/api.py
Expand Up @@ -39,9 +39,7 @@ def check_bucket_exists(f):
@functools.wraps(f)
def g(self, bucket_id, *args, **kwargs):
if bucket_id not in self.db.buckets():
raise NotFound(
"NoSuchBucket", f"There's no bucket named {bucket_id}"
)
raise NotFound("NoSuchBucket", f"There's no bucket named {bucket_id}")
return f(self, bucket_id, *args, **kwargs)

return g
Expand Down Expand Up @@ -206,9 +204,7 @@ def get_eventcount(
self, bucket_id: str, start: datetime = None, end: datetime = None
) -> int:
"""Get eventcount from a bucket"""
logger.debug(
f"Received get request for eventcount in bucket '{bucket_id}'"
)
logger.debug(f"Received get request for eventcount in bucket '{bucket_id}'")
return self.db[bucket_id].get_eventcount(start, end)

@check_bucket_exists
Expand Down Expand Up @@ -310,7 +306,7 @@ def query2(self, name, query, timeperiods, cache):
] # iso8601 timeperiods are separated by a slash
starttime = iso8601.parse_date(period[0])
endtime = iso8601.parse_date(period[1])
query = ''.join(query)
query = "".join(query)
result.append(query2.query(name, query, starttime, endtime, self.db))
return result

Expand Down

0 comments on commit 644d14c

Please sign in to comment.