@@ -39,9 +39,7 @@ def check_bucket_exists(f):
39
39
@functools .wraps (f )
40
40
def g (self , bucket_id , * args , ** kwargs ):
41
41
if bucket_id not in self .db .buckets ():
42
- raise NotFound (
43
- "NoSuchBucket" , f"There's no bucket named { bucket_id } "
44
- )
42
+ raise NotFound ("NoSuchBucket" , f"There's no bucket named { bucket_id } " )
45
43
return f (self , bucket_id , * args , ** kwargs )
46
44
47
45
return g
@@ -206,9 +204,7 @@ def get_eventcount(
206
204
self , bucket_id : str , start : datetime = None , end : datetime = None
207
205
) -> int :
208
206
"""Get eventcount from a bucket"""
209
- logger .debug (
210
- f"Received get request for eventcount in bucket '{ bucket_id } '"
211
- )
207
+ logger .debug (f"Received get request for eventcount in bucket '{ bucket_id } '" )
212
208
return self .db [bucket_id ].get_eventcount (start , end )
213
209
214
210
@check_bucket_exists
@@ -310,7 +306,7 @@ def query2(self, name, query, timeperiods, cache):
310
306
] # iso8601 timeperiods are separated by a slash
311
307
starttime = iso8601 .parse_date (period [0 ])
312
308
endtime = iso8601 .parse_date (period [1 ])
313
- query = '' .join (query )
309
+ query = "" .join (query )
314
310
result .append (query2 .query (name , query , starttime , endtime , self .db ))
315
311
return result
316
312
0 commit comments