aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
Diffstat (limited to 'bot')
-rw-r--r--bot/__main__.py1
-rw-r--r--bot/exts/fun/latex.py1
-rw-r--r--bot/exts/fun/trivia_quiz.py6
-rw-r--r--bot/exts/holidays/halloween/spookynamerate.py2
4 files changed, 8 insertions, 2 deletions
diff --git a/bot/__main__.py b/bot/__main__.py
index bacb2fdd..b3f346a8 100644
--- a/bot/__main__.py
+++ b/bot/__main__.py
@@ -17,6 +17,7 @@ from bot.utils.decorators import whitelist_check
log = get_logger(__name__)
setup_sentry()
+
async def _create_redis_session() -> RedisSession:
"""Create and connect to a redis session."""
redis_session = RedisSession(
diff --git a/bot/exts/fun/latex.py b/bot/exts/fun/latex.py
index cd7dba11..13b3c503 100644
--- a/bot/exts/fun/latex.py
+++ b/bot/exts/fun/latex.py
@@ -76,7 +76,6 @@ class LatexServerError(Exception):
"""Represents an error raised from Latex rendering server."""
-
class Latex(commands.Cog):
"""Renders latex."""
diff --git a/bot/exts/fun/trivia_quiz.py b/bot/exts/fun/trivia_quiz.py
index d7b49f7a..62574a16 100644
--- a/bot/exts/fun/trivia_quiz.py
+++ b/bot/exts/fun/trivia_quiz.py
@@ -104,6 +104,7 @@ def linear_system(q_format: str, a_format: str) -> QuizEntry:
return QuizEntry(question, [answer], DYNAMICALLY_GEN_VARIATION_TOLERANCE)
+
def mod_arith(q_format: str, a_format: str) -> QuizEntry:
"""Generate a basic modular arithmetic question."""
quotient, m, b = random.randint(30, 40), random.randint(10, 20), random.randint(200, 350)
@@ -115,6 +116,7 @@ def mod_arith(q_format: str, a_format: str) -> QuizEntry:
return QuizEntry(question, [answer], DYNAMICALLY_GEN_VARIATION_TOLERANCE)
+
def ngonal_prism(q_format: str, a_format: str) -> QuizEntry:
"""Generate a question regarding vertices on n-gonal prisms."""
n = random.randint(0, len(N_PREFIXES) - 1)
@@ -124,6 +126,7 @@ def ngonal_prism(q_format: str, a_format: str) -> QuizEntry:
return QuizEntry(question, [answer], DYNAMICALLY_GEN_VARIATION_TOLERANCE)
+
def imag_sqrt(q_format: str, a_format: str) -> QuizEntry:
"""Generate a negative square root question."""
ans_coeff = random.randint(3, 10)
@@ -133,6 +136,7 @@ def imag_sqrt(q_format: str, a_format: str) -> QuizEntry:
return QuizEntry(question, [answer], DYNAMICALLY_GEN_VARIATION_TOLERANCE)
+
def binary_calc(q_format: str, a_format: str) -> QuizEntry:
"""Generate a binary calculation question."""
a = random.randint(15, 20)
@@ -155,6 +159,7 @@ def binary_calc(q_format: str, a_format: str) -> QuizEntry:
return QuizEntry(question, [answer], DYNAMICALLY_GEN_VARIATION_TOLERANCE)
+
def solar_system(q_format: str, a_format: str) -> QuizEntry:
"""Generate a question on the planets of the Solar System."""
planet = random.choice(PLANETS)
@@ -164,6 +169,7 @@ def solar_system(q_format: str, a_format: str) -> QuizEntry:
return QuizEntry(question, [answer], DYNAMICALLY_GEN_VARIATION_TOLERANCE)
+
def taxonomic_rank(q_format: str, a_format: str) -> QuizEntry:
"""Generate a question on taxonomic classification."""
level = random.randint(0, len(TAXONOMIC_HIERARCHY) - 2)
diff --git a/bot/exts/holidays/halloween/spookynamerate.py b/bot/exts/holidays/halloween/spookynamerate.py
index b4beddc8..73674c31 100644
--- a/bot/exts/holidays/halloween/spookynamerate.py
+++ b/bot/exts/holidays/halloween/spookynamerate.py
@@ -32,7 +32,7 @@ ADDED_MESSAGES = [
"If you got it, haunt it.",
"TIME TO GET YOUR SPOOKY ON! :skull:",
]
-PING = "<@{id}>" # noqa: RUF027
+PING = "<@{id}>"
EMOJI_MESSAGE = "\n".join(f"- {emoji} {val}" for emoji, val in EMOJIS_VAL.items())
HELP_MESSAGE_DICT = {