Skip to content

Commit

Permalink
Add bandit linting
Browse files Browse the repository at this point in the history
  • Loading branch information
wvanhed committed May 25, 2024
1 parent ce2b092 commit 3f1a229
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Change the following values to match your situation
# city = "gent" # this used to be required, but is optional since January 2024
username = "johndoe"
password = "password"
password = "password" # noqa: S105
account_id = "123456"

print("\nFetching accounts...")
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ extend-select = [
"SIM", # flake8-simplify, for simplified code
"PTH", # pathlib (instead of os.path)
"W", # warning
"T2"
"T2", # flake8-print (avoiding prints)
"S", # bandit, security checks
]
ignore = [
"N818", # error suffix in exception names
Expand All @@ -52,4 +53,5 @@ ignore = [

[tool.ruff.lint.per-file-ignores]
"**/tests/*" = ["T"]
"examples/*" = ["T"]
"examples/*" = ["T"]
"**/tests*" = ["S101"] # Use of `assert` detected
1 change: 1 addition & 0 deletions tests/tst_mijnbibliotheek.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ruff: noqa: S301 # suspicious-pickle-usage
import configparser
import pickle
import sys
Expand Down

0 comments on commit 3f1a229

Please sign in to comment.