diff options
author | 2024-02-19 21:35:56 +0000 | |
---|---|---|
committer | 2024-03-04 12:35:02 +0000 | |
commit | ccd94c90d33b7aee85117078576684fab5055ce5 (patch) | |
tree | f54d2e3c71f12fe4613026d5a35ceae4dea4bd5a /pydis_core/utils/checks.py | |
parent | ruff lint fix: Run remaining auto-fixable rules (diff) |
ruff lint fix: Manual non-breaking changes
Diffstat (limited to 'pydis_core/utils/checks.py')
-rw-r--r-- | pydis_core/utils/checks.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pydis_core/utils/checks.py b/pydis_core/utils/checks.py index 33a78516..50fb2082 100644 --- a/pydis_core/utils/checks.py +++ b/pydis_core/utils/checks.py @@ -99,7 +99,7 @@ def in_whitelist_check( def cooldown_with_role_bypass( rate: int, per: float, - type: BucketType = BucketType.default, + type_: BucketType = BucketType.default, *, bypass_roles: Iterable[int] ) -> Callable: @@ -124,11 +124,11 @@ def cooldown_with_role_bypass( bypass = set(bypass_roles) # This handles the actual cooldown logic. - buckets = CooldownMapping(Cooldown(rate, per, type)) + buckets = CooldownMapping(Cooldown(rate, per, type_)) # Will be called after the command has been parse but before it has been invoked, ensures that # the cooldown won't be updated if the user screws up their input to the command. - async def predicate(cog: Cog, ctx: Context) -> None: + async def predicate(_: Cog, ctx: Context) -> None: nonlocal bypass, buckets if any(role.id in bypass for role in ctx.author.roles): @@ -152,7 +152,7 @@ def cooldown_with_role_bypass( "This means it has to be above the command decorator in the code." ) - command._before_invoke = predicate + command._before_invoke = predicate # noqa: SLF001 return command |