@@ -164,7 +164,7 @@ async def __call__(self, ctx, *args, **kwargs):
164
164
def _prepare_cooldowns (self , ctx : ApplicationContext ):
165
165
if self ._buckets .valid :
166
166
current = datetime .datetime .now ().timestamp ()
167
- bucket = self ._buckets .get_bucket (ctx , current ) # type: ignore ( ctx instead of non-existent message)
167
+ bucket = self ._buckets .get_bucket (ctx , current ) # type: ignore # ctx instead of non-existent message
168
168
169
169
if bucket is not None :
170
170
retry_after = bucket .update_rate_limit (current )
@@ -183,14 +183,14 @@ async def prepare(self, ctx: ApplicationContext) -> None:
183
183
if hasattr (self , "_max_concurrency" ):
184
184
if self ._max_concurrency is not None :
185
185
# For this application, context can be duck-typed as a Message
186
- await self ._max_concurrency .acquire (ctx ) # type: ignore ( ctx instead of non-existent message)
186
+ await self ._max_concurrency .acquire (ctx ) # type: ignore # ctx instead of non-existent message
187
187
188
188
try :
189
189
self ._prepare_cooldowns (ctx )
190
190
await self .call_before_hooks (ctx )
191
191
except :
192
192
if self ._max_concurrency is not None :
193
- await self ._max_concurrency .release (ctx ) # type: ignore ( ctx instead of non-existent message)
193
+ await self ._max_concurrency .release (ctx ) # type: ignore # ctx instead of non-existent message
194
194
raise
195
195
196
196
def is_on_cooldown (self , ctx : ApplicationContext ) -> bool :
@@ -226,7 +226,7 @@ def reset_cooldown(self, ctx: ApplicationContext) -> None:
226
226
The invocation context to reset the cooldown under.
227
227
"""
228
228
if self ._buckets .valid :
229
- bucket = self ._buckets .get_bucket (ctx ) # type: ignore ( ctx instead of non-existent message)
229
+ bucket = self ._buckets .get_bucket (ctx ) # type: ignore # ctx instead of non-existent message
230
230
bucket .reset ()
231
231
232
232
def get_cooldown_retry_after (self , ctx : ApplicationContext ) -> float :
@@ -630,7 +630,7 @@ def _match_option_param_names(self, params, options):
630
630
check_annotations = [
631
631
lambda o , a : o .input_type == SlashCommandOptionType .string and o .converter is not None , # pass on converters
632
632
lambda o , a : isinstance (o .input_type , SlashCommandOptionType ), # pass on slash cmd option type enums
633
- lambda o , a : isinstance (o ._raw_type , tuple ) and a == Union [o ._raw_type ], # type: ignore ( union types)
633
+ lambda o , a : isinstance (o ._raw_type , tuple ) and a == Union [o ._raw_type ], # type: ignore # union types
634
634
lambda o , a : self ._is_typing_optional (a ) and not o .required and o ._raw_type in a .__args__ , # optional
635
635
lambda o , a : inspect .isclass (a ) and issubclass (a , o ._raw_type ) # 'normal' types
636
636
]
0 commit comments