Skip to content

Commit 28b2bfe

Browse files
authored
Remove Bandit from workflows (#223)
1 parent 16047c7 commit 28b2bfe

6 files changed

+7
-120
lines changed

bot/cogs/config.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@
3838
from libs.utils.time import FriendlyTimeResult, UserFriendlyTime
3939

4040
if TYPE_CHECKING:
41-
from cogs.tickets import Tickets
4241
from rodhaj import Rodhaj
4342

43+
from cogs.tickets import Tickets
44+
4445

4546
UNKNOWN_ERROR_MESSAGE = (
4647
"An unknown error happened. Please contact the dev team for assistance"

bot/cogs/utilities.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def about(self, ctx: RoboContext) -> None:
8282
# For Kumiko, it's done differently
8383
# R. Danny's way of doing it is probably close enough anyways
8484
memory_usage = self.process.memory_full_info().uss / 1024**2
85-
cpu_usage = self.process.cpu_percent() / psutil.cpu_count() # type: ignore
85+
cpu_usage = self.process.cpu_percent() / psutil.cpu_count() # type: ignore
8686
bot_user: discord.ClientUser = self.bot.user # type: ignore
8787

8888
revisions = "See [GitHub](https://github.com/transprogrammer/rodhaj)"

lefthook.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
pre-commit:
22
commands:
3-
bandit:
4-
glob: "*.py"
5-
staged_files: true
6-
run: bandit {staged_files} -c pyproject.toml
73
ruff-check:
84
glob: "*.py"
95
staged_files: true
10-
run: ruff check {staged_files} --fix --exit-non-zero-on-fix --config pyproject.toml
6+
run: ruff check {staged_files} --fix --exit-non-zero-on-fix
117
ruff-fmt:
128
glob: "*.py"
139
staged_files: true
14-
run: ruff format {staged_files} --config pyproject.toml
10+
run: ruff format {staged_files}

poetry.lock

+1-105
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1-6
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ msgspec = {git = "https://github.com/jcrist/msgspec", rev = "595c33c4a71c6d0c539
3232
[tool.poetry.group.dev.dependencies]
3333
lefthook = "^1.8.4"
3434
pyright = "^1.1.389"
35-
bandit = {extras = ["toml"], version = "^1.7.10"}
3635
ruff = "^0.7.4"
3736
tox = "^4.23.2"
3837

@@ -53,12 +52,8 @@ reportMissingImports = true
5352
typeCheckingMode = "basic"
5453
reportUnnecessaryTypeIgnoreComment = "warning"
5554

56-
[tool.bandit]
57-
skips = ["B311", "B101"]
58-
5955
[tool.ruff]
6056
line-length = 88
61-
indent-width = 4
6257

6358
[tool.ruff.lint]
6459
ignore = [
@@ -84,7 +79,7 @@ ignore = [
8479
"ISC001",
8580
"ISC002"
8681
]
87-
select = ["E", "F", "N", "ASYNC", "S", "ERA"]
82+
select = ["E", "F", "N", "ASYNC", "S", "ERA", "I"]
8883
fixable = ["ALL"]
8984

9085
[tool.ruff.lint.isort]

requirements-dev.txt

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# Develoment
44
lefthook>=1.7.22,<2
55
pyright>=1.1.363,<2
6-
bandit[toml]>=1.7.10,<2
76
ruff>=0.4.4,<1
87
tox>=4.15.0,<5
98

0 commit comments

Comments
 (0)