diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 131b7d5..8b4fd82 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -11,7 +11,7 @@ repos: - id: check-json - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.6 + rev: v0.13.3 hooks: - id: ruff args: [ --fix, --exit-non-zero-on-fix ] diff --git a/onetrueslash/commands.py b/onetrueslash/commands.py index dd60799..a13a7ef 100644 --- a/onetrueslash/commands.py +++ b/onetrueslash/commands.py @@ -120,7 +120,7 @@ async def onetrueslash_command_autocomplete( if not command or command in matches: continue try: - if name == "help" and await command.can_run(ctx) or await _filter(command): + if (name == "help" and await command.can_run(ctx)) or await _filter(command): if len(name) > 100: name = name[:99] + "\N{HORIZONTAL ELLIPSIS}" matches[command] = name diff --git a/rift/converter.py b/rift/converter.py index 8fbeacd..ded4642 100644 --- a/rift/converter.py +++ b/rift/converter.py @@ -121,14 +121,14 @@ async def _search( if channel in results: continue if channel == source: - reasons[ - channel.mention - ] = "Rifts cannot be opened to the same channel as their source." + reasons[channel.mention] = ( + "Rifts cannot be opened to the same channel as their source." + ) continue if getattr(channel, "nsfw", False) != is_nsfw: - reasons[ - channel.mention - ] = f"Channel {'is not' if is_nsfw else 'is'} nsfw, while this channel {'is' if is_nsfw else 'is not'}." + reasons[channel.mention] = ( + f"Channel {'is not' if is_nsfw else 'is'} nsfw, while this channel {'is' if is_nsfw else 'is not'}." + ) continue if blacklists[1].get(channel.id, {}).get("blacklisted"): reasons[channel.mention] = "Channel is blocked from receiving rifts." diff --git a/rtfs/pages.py b/rtfs/pages.py index 6ffef2c..860bcf5 100644 --- a/rtfs/pages.py +++ b/rtfs/pages.py @@ -77,7 +77,7 @@ async def _fill_index(self, idx: int) -> int: class _AsyncIterSource(Generic[_T_co]): - __slots__ = ("_cache", "_aiter") + __slots__ = ("_aiter", "_cache") def __init__(self, __seq: AsyncIterable[_T_co]) -> None: self._aiter = aiter(__seq) diff --git a/turn/turn.py b/turn/turn.py index f5d0bc6..f8359ed 100644 --- a/turn/turn.py +++ b/turn/turn.py @@ -13,7 +13,7 @@ class Game(NamedList): - __slots__ = "queue", "destination", "source", "time", "paused", "task" + __slots__ = "destination", "paused", "queue", "source", "task", "time" def standstr(argument):