Skip to content

Commit 1875f18

Browse files
committed
switch from bandit tooling to the S ruff rule
1 parent e73afb3 commit 1875f18

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

.github/workflows/tooling.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ jobs:
2525
pyright: 'true'
2626
ruff-linter: 'true'
2727
ruff-formatter: 'true'
28-
bandit: 'true'
2928
python-version: ${{ matrix.python-version }}
3029
requirements: 'requirements.txt'

plugin/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ async def handle_auto_doctype(self, data: PartialLibrary) -> Library | None:
242242
lib = cls.from_partial(data)
243243
try:
244244
await lib.build_cache(self.session, self.webserver_port)
245-
except: # noqa: E722 #nosec
245+
except: # noqa: E722, S110
246246
pass
247247
else:
248248
return lib

pyproject.toml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ select = [
2424
"PGH", # https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
2525
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
2626
"PLE", # https://docs.astral.sh/ruff/rules/#error-e_1
27+
"S", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
2728
]
2829
ignore = [
2930
"SIM105", # https://docs.astral.sh/ruff/rules/suppressible-exception/
@@ -36,6 +37,7 @@ ignore = [
3637
"ANN202", # https://docs.astral.sh/ruff/rules/missing-return-type-private-function
3738
"RUF006", # https://docs.astral.sh/ruff/rules/asyncio-dangling-task
3839
"F403", # https://docs.astral.sh/ruff/rules/undefined-local-with-import-star
40+
"S101" # https://docs.astral.sh/ruff/rules/assert
3941
]
4042

4143
[tool.ruff.format]
@@ -44,14 +46,6 @@ indent-style = "space"
4446
skip-magic-trailing-comma = false
4547
line-ending = "auto"
4648

47-
[tool.bandit]
48-
exclude_dirs = [
49-
".github", "venv", "docs", "lib"
50-
]
51-
skips = [
52-
"B101" # skip asssets as they are used for typing purposes
53-
]
54-
5549
[tool.pyright]
5650
include = [
5751
"plugin","build_plugin.py", "main.py"

0 commit comments

Comments
 (0)