From 745cd1d6d3d6227d2a1e82cf25611d76221c40cd Mon Sep 17 00:00:00 2001 From: decorator-factory <42166884+decorator-factory@users.noreply.github.com> Date: Sat, 7 Aug 2021 05:23:03 +0300 Subject: Fix type annotations --- bot/exts/evergreen/cheatsheet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/exts/evergreen/cheatsheet.py') diff --git a/bot/exts/evergreen/cheatsheet.py b/bot/exts/evergreen/cheatsheet.py index ae7793c9..f37d3f66 100644 --- a/bot/exts/evergreen/cheatsheet.py +++ b/bot/exts/evergreen/cheatsheet.py @@ -1,6 +1,6 @@ import random import re -import typing as t +from typing import Union from urllib.parse import quote_plus from discord import Embed @@ -52,7 +52,7 @@ class CheatSheet(commands.Cog): ) return embed - def result_fmt(self, url: str, body_text: str) -> t.Tuple[bool, t.Union[str, Embed]]: + def result_fmt(self, url: str, body_text: str) -> tuple[bool, Union[str, Embed]]: """Format Result.""" if body_text.startswith("# 404 NOT FOUND"): embed = self.fmt_error_embed() -- cgit v1.2.3 From ca15abb76ccb6662e419503eae21d312d28df3b3 Mon Sep 17 00:00:00 2001 From: wookie184 Date: Wed, 1 Sep 2021 15:44:35 +0100 Subject: Improved consistency for codeblocks to end with a newline --- bot/exts/evergreen/cheatsheet.py | 4 +-- bot/exts/evergreen/snakes/_utils.py | 60 ++++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 30 deletions(-) (limited to 'bot/exts/evergreen/cheatsheet.py') diff --git a/bot/exts/evergreen/cheatsheet.py b/bot/exts/evergreen/cheatsheet.py index ae7793c9..c45f9893 100644 --- a/bot/exts/evergreen/cheatsheet.py +++ b/bot/exts/evergreen/cheatsheet.py @@ -64,13 +64,13 @@ class CheatSheet(commands.Cog): description = ( f"**Result Of cht.sh**\n" f"```python\n{body_text[:body_space]}\n" - f"... (truncated - too many lines)```\n" + f"... (truncated - too many lines)\n```\n" f"Full results: {url} " ) else: description = ( f"**Result Of cht.sh**\n" - f"```python\n{body_text}```\n" + f"```python\n{body_text}\n```\n" f"{url}" ) return False, description diff --git a/bot/exts/evergreen/snakes/_utils.py b/bot/exts/evergreen/snakes/_utils.py index 2c825c7c..a3ff3d12 100644 --- a/bot/exts/evergreen/snakes/_utils.py +++ b/bot/exts/evergreen/snakes/_utils.py @@ -18,37 +18,41 @@ from bot.constants import Roles SNAKE_RESOURCES = Path("bot/resources/snakes").absolute() h1 = r"""``` - ---- - ------ - /--------\ - |--------| - |--------| - \------/ - ----```""" + ---- + ------ +/--------\ +|--------| +|--------| + \------/ + ---- +```""" h2 = r"""``` - ---- - ------ - /---\-/--\ - |-----\--| - |--------| - \------/ - ----```""" + ---- + ------ +/---\-/--\ +|-----\--| +|--------| + \------/ + ---- +```""" h3 = r"""``` - ---- - ------ - /---\-/--\ - |-----\--| - |-----/--| - \----\-/ - ----```""" + ---- + ------ +/---\-/--\ +|-----\--| +|-----/--| + \----\-/ + ---- +```""" h4 = r"""``` - ----- - ----- \ - /--| /---\ - |--\ -\---| - |--\--/-- / - \------- / - ------```""" + ----- + ----- \ +/--| /---\ +|--\ -\---| +|--\--/-- / + \------- / + ------ +```""" stages = [h1, h2, h3, h4] snakes = { "Baby Python": "https://i.imgur.com/SYOcmSa.png", -- cgit v1.2.3