Skip to content

Commit 1197ec4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 75cb121 commit 1197ec4

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

anticrashvid/anticrashvid.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ async def cry(self, message: discord.Message):
185185
user=message.author,
186186
moderator=message.guild.me,
187187
channel=message.channel,
188-
reason=message.jump_url
189-
if not message_deleted
190-
else "Offending message was deleted.",
188+
reason=(
189+
message.jump_url if not message_deleted else "Offending message was deleted."
190+
),
191191
)
192192
except Exception:
193193
pass

nationstates/nationstates.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,11 @@ async def nation(self, ctx: commands.Context, *, nation: Link[Nation]):
345345
embed.add_field(
346346
name="{}{}".format(
347347
(self._find_text_and_assert(root, "ZOMBIE/ZACTION") or "No Action").title(),
348-
" (Unintended)"
349-
if self._find_text_and_assert(root, "ZOMBIE/ZACTIONINTENDED")
350-
else "",
348+
(
349+
" (Unintended)"
350+
if self._find_text_and_assert(root, "ZOMBIE/ZACTIONINTENDED")
351+
else ""
352+
),
351353
),
352354
value="Survivors: {} | Zombies: {} | Dead: {}".format(
353355
self._illion(self._find_text_and_assert(root, "ZOMBIE/SURVIVORS", int)),
@@ -781,10 +783,12 @@ async def wa(self, ctx: commands.Context, resolution_id: Optional[int] = None, *
781783
) # + (4 * 24 * 60 * 60) # 4 Days
782784
embed = ProxyEmbed(
783785
title=self._find_text_and_assert(root, "NAME"),
784-
url="https://www.nationstates.net/page={}".format("sc" if is_sc else "ga")
785-
if not resolution_id
786-
else "https://www.nationstates.net/page=WA_past_resolution/id={}/council={}".format(
787-
resolution_id, "2" if is_sc else "1"
786+
url=(
787+
"https://www.nationstates.net/page={}".format("sc" if is_sc else "ga")
788+
if not resolution_id
789+
else "https://www.nationstates.net/page=WA_past_resolution/id={}/council={}".format(
790+
resolution_id, "2" if is_sc else "1"
791+
)
788792
),
789793
description=description,
790794
timestamp=datetime.fromtimestamp(impl, timezone.utc),

rift/converter.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ async def _search(
121121
if channel in results:
122122
continue
123123
if channel == source:
124-
reasons[
125-
channel.mention
126-
] = "Rifts cannot be opened to the same channel as their source."
124+
reasons[channel.mention] = (
125+
"Rifts cannot be opened to the same channel as their source."
126+
)
127127
continue
128128
if getattr(channel, "nsfw", False) != is_nsfw:
129-
reasons[
130-
channel.mention
131-
] = f"Channel {'is not' if is_nsfw else 'is'} nsfw, while this channel {'is' if is_nsfw else 'is not'}."
129+
reasons[channel.mention] = (
130+
f"Channel {'is not' if is_nsfw else 'is'} nsfw, while this channel {'is' if is_nsfw else 'is not'}."
131+
)
132132
continue
133133
if blacklists[1].get(channel.id, {}).get("blacklisted"):
134134
reasons[channel.mention] = "Channel is blocked from receiving rifts."

rift/rift.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,11 @@ def deduplicate_iterables(*iterables: Iterable[_H]) -> List[_H]: # noqa: F811
5757

5858

5959
@overload
60-
async def can_close(ctx: commands.Context) -> bool:
61-
...
60+
async def can_close(ctx: commands.Context) -> bool: ...
6261

6362

6463
@overload
65-
async def can_close(ctx: discord.Message, bot: Red) -> bool:
66-
...
64+
async def can_close(ctx: discord.Message, bot: Red) -> bool: ...
6765

6866

6967
async def can_close(ctx: Union[commands.Context, discord.Message], bot: Red = None):

0 commit comments

Comments
 (0)