@@ -130,7 +130,7 @@ async def _get_previous_time_schedules(self) -> list[bytes]:
130130 if key_time and key_time <= minute_before :
131131 time_keys .append (key .decode ())
132132 for key in time_keys :
133- schedules .extend (await redis .lrange (key , 0 , - 1 )) # type: ignore
133+ schedules .extend (await redis .lrange (key , 0 , - 1 ))
134134
135135 return schedules
136136
@@ -146,10 +146,10 @@ async def delete_schedule(self, schedule_id: str) -> None:
146146 )
147147 # We need to remove the schedule from the cron or time list.
148148 if schedule .cron is not None :
149- await redis .lrem (self ._get_cron_key (), 0 , schedule_id ) # type: ignore
149+ await redis .lrem (self ._get_cron_key (), 0 , schedule_id )
150150 elif schedule .time is not None :
151151 time_key = self ._get_time_key (schedule .time )
152- await redis .lrem (time_key , 0 , schedule_id ) # type: ignore
152+ await redis .lrem (time_key , 0 , schedule_id )
153153
154154 async def add_schedule (self , schedule : "ScheduledTask" ) -> None :
155155 """Add a schedule to the source."""
@@ -163,9 +163,9 @@ async def add_schedule(self, schedule: "ScheduledTask") -> None:
163163 # This is an optimization, so we can get all the schedules
164164 # for the current time much faster.
165165 if schedule .cron is not None :
166- await redis .rpush (self ._get_cron_key (), schedule .schedule_id ) # type: ignore
166+ await redis .rpush (self ._get_cron_key (), schedule .schedule_id )
167167 elif schedule .time is not None :
168- await redis .rpush ( # type: ignore
168+ await redis .rpush (
169169 self ._get_time_key (schedule .time ),
170170 schedule .schedule_id ,
171171 )
@@ -195,11 +195,11 @@ async def get_schedules(self) -> List["ScheduledTask"]:
195195 self ._is_first_run = False
196196 async with Redis (connection_pool = self ._connection_pool ) as redis :
197197 buffer = []
198- crons = await redis .lrange (self ._get_cron_key (), 0 , - 1 ) # type: ignore
198+ crons = await redis .lrange (self ._get_cron_key (), 0 , - 1 )
199199 logger .debug ("Got %d cron schedules" , len (crons ))
200200 if crons :
201201 buffer .extend (crons )
202- timed .extend (await redis .lrange (self ._get_time_key (current_time ), 0 , - 1 )) # type: ignore
202+ timed .extend (await redis .lrange (self ._get_time_key (current_time ), 0 , - 1 ))
203203 logger .debug ("Got %d timed schedules" , len (timed ))
204204 if timed :
205205 buffer .extend (timed )
0 commit comments