Skip to content

Commit

Permalink
Remove bandit and replace with it's ruff variant (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
jplhanna authored Apr 23, 2024
1 parent 9535cc4 commit e6ab4e8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 136 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
- name: Lint with ruff
if: always()
run: docker-compose run test-pipeline ruff src
- name: Check with bandit
if: always()
run: docker-compose run test-pipeline bandit -r src -c pyproject.toml
- name: Test with unit pytest
if: always()
run: |
Expand Down
10 changes: 0 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@ repos:
exclude: alembic
args: [--fix, --exit-non-zero-on-fix]

- repo: local
hooks:
- id: bandit
name: bandit
entry: bandit
language: system
types: [ python ]
exclude: alembic|test_.*|conftest.py
args: [ -c, pyproject.toml ]

- repo: https://github.com/radix-ai/auto-smart-commit
rev: v1.0.3
hooks:
Expand Down
119 changes: 1 addition & 118 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]

[tool.bandit]
exclude_dirs = ["test"]

[tool.black]
line-length = 120

Expand Down Expand Up @@ -74,7 +71,6 @@ sqlmodel = "^0.0.14"
typing-extensions = "^4.9.0"

[tool.poetry.group.dev.dependencies]
bandit = {extras = ["toml"], version = "^1.7.4"}
black = "*"
coverage = {extras = ["toml"], version = "^6.4.4"}
factory-boy = "^3.3.0"
Expand Down Expand Up @@ -114,6 +110,7 @@ select = [
"C",
"PT",
"I",
"S",
"RSE",
"RET501",
"RET502",
Expand Down Expand Up @@ -141,3 +138,4 @@ max-complexity = 10
[tool.ruff.lint.per-file-ignores]
"src/helpers/factories/*" = ["FBT001"]
"src/model_hub.py" = ["F401"]
"src/tests/*" = ["S"]
2 changes: 1 addition & 1 deletion src/bot/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,5 @@ async def select_from_tavern_menu(
return NO_MENU_ITEMS_FOR_CHOSEN_DAY_MESSAGE
food_text = food_items[0].food.title()
if style == ChooseStyle.RANDOM:
food_text = random.choice(food_items).food.title() # nosec
food_text = random.choice(food_items).food.title() # noqa: S311
return f"Order Up!\n{food_text}"

0 comments on commit e6ab4e8

Please sign in to comment.