aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-03-21 13:30:14 +0000
committerGravatar GitHub <[email protected]>2024-03-21 13:30:14 +0000
commit365fea67f2a47d78ea1eda047264cf10b4f84157 (patch)
tree08b19b418a43373402b0b403f8a8ffd83cb30834 /bot
parentMerge pull request #1481 from python-discord/dependabot/pip/pydis-core-11.0.1 (diff)
Bump ruff from 0.2.1 to 0.3.3 (#1479)
* Bump ruff from 0.2.1 to 0.3.3 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.2.1 to 0.3.3. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.2.1...v0.3.3) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * apply ruff fixes --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: shtlrs <[email protected]>
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 = {