@@ -210,7 +210,7 @@ def find(
210210 self ,
211211 id : str ,
212212 event_context : EventContext ,
213- peeker : 'function' = None ,
213+ peeker : Callable = None ,
214214 visible_only = True ,
215215 mapper : Callable = None ,
216216 ):
@@ -275,7 +275,7 @@ def partial_update(
275275 id : str ,
276276 changes : dict ,
277277 event_context : EventContext ,
278- peeker : 'function' = None ,
278+ peeker : Callable = None ,
279279 visible_only = True ,
280280 mapper : Callable = None ,
281281 ):
@@ -305,7 +305,7 @@ def delete(
305305 self ,
306306 id : str ,
307307 event_context : EventContext ,
308- peeker : 'function' = None ,
308+ peeker : Callable = None ,
309309 mapper : Callable = None ,
310310 ):
311311 return self .partial_update (
@@ -348,7 +348,9 @@ def __init__(self, repository: CosmosDBRepository):
348348 def get_all (self , conditions : dict = None , ** kwargs ) -> list :
349349 conditions = conditions if conditions else {}
350350 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+ )
352354
353355 def get (self , id ):
354356 event_ctx = self .create_event_context ("read" )
@@ -406,6 +408,7 @@ def generate_uuid4() -> str:
406408
407409def get_last_day_of_month (year : int , month : int ) -> int :
408410 from calendar import monthrange
411+
409412 return monthrange (year = year , month = month )[1 ]
410413
411414
@@ -419,7 +422,9 @@ def get_current_month() -> int:
419422
420423def get_date_range_of_month (year : int , month : int ) -> Dict [str , str ]:
421424 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+ )
423428
424429 last_day_of_month = get_last_day_of_month (year = year , month = month )
425430 end_date = datetime (
@@ -430,7 +435,7 @@ def get_date_range_of_month(year: int, month: int) -> Dict[str, str]:
430435 minute = 59 ,
431436 second = 59 ,
432437 microsecond = 999999 ,
433- tzinfo = timezone .utc
438+ tzinfo = timezone .utc ,
434439 )
435440
436441 return {
0 commit comments