diff options
author | 2024-03-21 13:30:14 +0000 | |
---|---|---|
committer | 2024-03-21 13:30:14 +0000 | |
commit | 365fea67f2a47d78ea1eda047264cf10b4f84157 (patch) | |
tree | 08b19b418a43373402b0b403f8a8ffd83cb30834 | |
parent | Merge 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]>
-rw-r--r-- | bot/__main__.py | 1 | ||||
-rw-r--r-- | bot/exts/fun/latex.py | 1 | ||||
-rw-r--r-- | bot/exts/fun/trivia_quiz.py | 6 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/spookynamerate.py | 2 | ||||
-rw-r--r-- | poetry.lock | 38 | ||||
-rw-r--r-- | pyproject.toml | 2 |
6 files changed, 28 insertions, 22 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 = { diff --git a/poetry.lock b/poetry.lock index 443320fd..f6b0828c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1508,28 +1508,28 @@ ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)" [[package]] name = "ruff" -version = "0.2.1" +version = "0.3.3" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.2.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:dd81b911d28925e7e8b323e8d06951554655021df8dd4ac3045d7212ac4ba080"}, - {file = "ruff-0.2.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:dc586724a95b7d980aa17f671e173df00f0a2eef23f8babbeee663229a938fec"}, - {file = "ruff-0.2.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c92db7101ef5bfc18e96777ed7bc7c822d545fa5977e90a585accac43d22f18a"}, - {file = "ruff-0.2.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:13471684694d41ae0f1e8e3a7497e14cd57ccb7dd72ae08d56a159d6c9c3e30e"}, - {file = "ruff-0.2.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a11567e20ea39d1f51aebd778685582d4c56ccb082c1161ffc10f79bebe6df35"}, - {file = "ruff-0.2.1-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:00a818e2db63659570403e44383ab03c529c2b9678ba4ba6c105af7854008105"}, - {file = "ruff-0.2.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:be60592f9d218b52f03384d1325efa9d3b41e4c4d55ea022cd548547cc42cd2b"}, - {file = "ruff-0.2.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:fbd2288890b88e8aab4499e55148805b58ec711053588cc2f0196a44f6e3d855"}, - {file = "ruff-0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3ef052283da7dec1987bba8d8733051c2325654641dfe5877a4022108098683"}, - {file = "ruff-0.2.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:7022d66366d6fded4ba3889f73cd791c2d5621b2ccf34befc752cb0df70f5fad"}, - {file = "ruff-0.2.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:0a725823cb2a3f08ee743a534cb6935727d9e47409e4ad72c10a3faf042ad5ba"}, - {file = "ruff-0.2.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:0034d5b6323e6e8fe91b2a1e55b02d92d0b582d2953a2b37a67a2d7dedbb7acc"}, - {file = "ruff-0.2.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:e5cb5526d69bb9143c2e4d2a115d08ffca3d8e0fddc84925a7b54931c96f5c02"}, - {file = "ruff-0.2.1-py3-none-win32.whl", hash = "sha256:6b95ac9ce49b4fb390634d46d6ece32ace3acdd52814671ccaf20b7f60adb232"}, - {file = "ruff-0.2.1-py3-none-win_amd64.whl", hash = "sha256:e3affdcbc2afb6f5bd0eb3130139ceedc5e3f28d206fe49f63073cb9e65988e0"}, - {file = "ruff-0.2.1-py3-none-win_arm64.whl", hash = "sha256:efababa8e12330aa94a53e90a81eb6e2d55f348bc2e71adbf17d9cad23c03ee6"}, - {file = "ruff-0.2.1.tar.gz", hash = "sha256:3b42b5d8677cd0c72b99fcaf068ffc62abb5a19e71b4a3b9cfa50658a0af02f1"}, + {file = "ruff-0.3.3-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:973a0e388b7bc2e9148c7f9be8b8c6ae7471b9be37e1cc732f8f44a6f6d7720d"}, + {file = "ruff-0.3.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:cfa60d23269d6e2031129b053fdb4e5a7b0637fc6c9c0586737b962b2f834493"}, + {file = "ruff-0.3.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1eca7ff7a47043cf6ce5c7f45f603b09121a7cc047447744b029d1b719278eb5"}, + {file = "ruff-0.3.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7d3f6762217c1da954de24b4a1a70515630d29f71e268ec5000afe81377642d"}, + {file = "ruff-0.3.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b24c19e8598916d9c6f5a5437671f55ee93c212a2c4c569605dc3842b6820386"}, + {file = "ruff-0.3.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:5a6cbf216b69c7090f0fe4669501a27326c34e119068c1494f35aaf4cc683778"}, + {file = "ruff-0.3.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:352e95ead6964974b234e16ba8a66dad102ec7bf8ac064a23f95371d8b198aab"}, + {file = "ruff-0.3.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d6ab88c81c4040a817aa432484e838aaddf8bfd7ca70e4e615482757acb64f8"}, + {file = "ruff-0.3.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79bca3a03a759cc773fca69e0bdeac8abd1c13c31b798d5bb3c9da4a03144a9f"}, + {file = "ruff-0.3.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:2700a804d5336bcffe063fd789ca2c7b02b552d2e323a336700abb8ae9e6a3f8"}, + {file = "ruff-0.3.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:fd66469f1a18fdb9d32e22b79f486223052ddf057dc56dea0caaf1a47bdfaf4e"}, + {file = "ruff-0.3.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:45817af234605525cdf6317005923bf532514e1ea3d9270acf61ca2440691376"}, + {file = "ruff-0.3.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:0da458989ce0159555ef224d5b7c24d3d2e4bf4c300b85467b08c3261c6bc6a8"}, + {file = "ruff-0.3.3-py3-none-win32.whl", hash = "sha256:f2831ec6a580a97f1ea82ea1eda0401c3cdf512cf2045fa3c85e8ef109e87de0"}, + {file = "ruff-0.3.3-py3-none-win_amd64.whl", hash = "sha256:be90bcae57c24d9f9d023b12d627e958eb55f595428bafcb7fec0791ad25ddfc"}, + {file = "ruff-0.3.3-py3-none-win_arm64.whl", hash = "sha256:0171aab5fecdc54383993389710a3d1227f2da124d76a2784a7098e818f92d61"}, + {file = "ruff-0.3.3.tar.gz", hash = "sha256:38671be06f57a2f8aba957d9f701ea889aa5736be806f18c0cd03d6ff0cbca8d"}, ] [[package]] @@ -1842,4 +1842,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "3.11.*" -content-hash = "faa60f7b8cdaf838cabe5efa240d0fd9a38efaa19bc9dccd5338ab116295b50d" +content-hash = "f05504759790c943633e06a62ca42c581e49c84120c342f241f9f97649839345" diff --git a/pyproject.toml b/pyproject.toml index 42a1ef2e..5460f48c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ pydantic-settings = "2.2.1" pip-licenses = "4.3.4" pre-commit = "3.6.2" python-dotenv = "1.0.1" -ruff = "0.2.1" +ruff = "0.3.3" taskipy = "1.12.2" [tool.taskipy.tasks] |