Skip to content

Commit 77a5097

Browse files
committed
ruff format
1 parent abb49ed commit 77a5097

File tree

4 files changed

+43
-14
lines changed

4 files changed

+43
-14
lines changed

bot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ async def handle_reaction_events(self, payload):
13161316
logger.warning("Failed to find linked message for reactions: %s", e)
13171317
return
13181318

1319-
if self.config["transfer_reactions"] and linked_messages is not [None]:
1319+
if self.config["transfer_reactions"] and linked_messages != [None]:
13201320
if payload.event_type == "REACTION_ADD":
13211321
for msg in linked_messages:
13221322
await self.add_reaction(msg, reaction)

cogs/utility.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@
2323

2424
from core import checks, migrations, utils
2525
from core.changelog import Changelog
26-
from core.models import HostingMethod, InvalidConfigError, PermissionLevel, UnseenFormatter, getLogger
26+
from core.models import (
27+
HostingMethod,
28+
InvalidConfigError,
29+
PermissionLevel,
30+
UnseenFormatter,
31+
getLogger,
32+
)
2733
from core.paginator import EmbedPaginatorSession, MessagePaginatorSession
2834
from core.utils import DummyParam, is_image_url, trigger_typing, truncate
2935

core/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import _string # type: ignore
12
import json
23
import logging
34
import os
@@ -10,7 +11,6 @@
1011
from string import Formatter
1112
from typing import Dict, Optional
1213

13-
import _string # type: ignore
1414
import discord
1515
from discord.ext import commands
1616

pyproject.toml

+34-11
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,44 @@ dev = [
4040
"pre-commit<4.0.0,>=3.6.0",
4141
]
4242

43-
[lint]
43+
[tool.ruff]
44+
# Exclude a variety of commonly ignored directories.
45+
exclude = [
46+
".bzr",
47+
".direnv",
48+
".eggs",
49+
".git",
50+
".git-rewrite",
51+
".hg",
52+
".ipynb_checkpoints",
53+
".mypy_cache",
54+
".nox",
55+
".pants.d",
56+
".pyenv",
57+
".pytest_cache",
58+
".pytype",
59+
".ruff_cache",
60+
".svn",
61+
".tox",
62+
".venv",
63+
".vscode",
64+
"__pypackages__",
65+
"_build",
66+
"buck-out",
67+
"build",
68+
"dist",
69+
"node_modules",
70+
"site-packages",
71+
"venv",
72+
]
73+
74+
[tool.ruff.lint]
4475
select = ["C90", "E", "F", "I001", "PGH004", "RUF100"]
4576
ignore = ["F405", "E741", "C901", "F403", "E501"]
46-
fixable = ["I001"]
77+
fixable = ["ALL"]
4778
mccabe.max-complexity = 25
4879
isort.combine-as-imports = true
49-
50-
[tool.ruff]
51-
target-version = "py311"
52-
line-length = 110
53-
fix = true
54-
force-exclude = true
55-
exclude = [
56-
"@local",
57-
]
80+
unfixable = []
5881

5982
[tool.black]
6083
line-length = "110"

0 commit comments

Comments
 (0)