@@ -210,7 +210,7 @@ def find(
210
210
self ,
211
211
id : str ,
212
212
event_context : EventContext ,
213
- peeker : 'function' = None ,
213
+ peeker : Callable = None ,
214
214
visible_only = True ,
215
215
mapper : Callable = None ,
216
216
):
@@ -275,7 +275,7 @@ def partial_update(
275
275
id : str ,
276
276
changes : dict ,
277
277
event_context : EventContext ,
278
- peeker : 'function' = None ,
278
+ peeker : Callable = None ,
279
279
visible_only = True ,
280
280
mapper : Callable = None ,
281
281
):
@@ -305,7 +305,7 @@ def delete(
305
305
self ,
306
306
id : str ,
307
307
event_context : EventContext ,
308
- peeker : 'function' = None ,
308
+ peeker : Callable = None ,
309
309
mapper : Callable = None ,
310
310
):
311
311
return self .partial_update (
@@ -348,7 +348,9 @@ def __init__(self, repository: CosmosDBRepository):
348
348
def get_all (self , conditions : dict = None , ** kwargs ) -> list :
349
349
conditions = conditions if conditions else {}
350
350
event_ctx = self .create_event_context ("read-many" )
351
- return self .repository .find_all (event_ctx , conditions = conditions , ** kwargs )
351
+ return self .repository .find_all (
352
+ event_ctx , conditions = conditions , ** kwargs
353
+ )
352
354
353
355
def get (self , id ):
354
356
event_ctx = self .create_event_context ("read" )
@@ -406,6 +408,7 @@ def generate_uuid4() -> str:
406
408
407
409
def get_last_day_of_month (year : int , month : int ) -> int :
408
410
from calendar import monthrange
411
+
409
412
return monthrange (year = year , month = month )[1 ]
410
413
411
414
@@ -419,7 +422,9 @@ def get_current_month() -> int:
419
422
420
423
def get_date_range_of_month (year : int , month : int ) -> Dict [str , str ]:
421
424
first_day_of_month = 1
422
- start_date = datetime (year = year , month = month , day = first_day_of_month ,tzinfo = timezone .utc )
425
+ start_date = datetime (
426
+ year = year , month = month , day = first_day_of_month , tzinfo = timezone .utc
427
+ )
423
428
424
429
last_day_of_month = get_last_day_of_month (year = year , month = month )
425
430
end_date = datetime (
@@ -430,7 +435,7 @@ def get_date_range_of_month(year: int, month: int) -> Dict[str, str]:
430
435
minute = 59 ,
431
436
second = 59 ,
432
437
microsecond = 999999 ,
433
- tzinfo = timezone .utc
438
+ tzinfo = timezone .utc ,
434
439
)
435
440
436
441
return {
0 commit comments