Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to ruff's version of bandit #1557

Merged
merged 4 commits into from
May 31, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,3 @@ repos:
- id: black
args: [--safe, --quiet]
files: (examples|pymodbus|test)/
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args: [-c, bandit.yaml]
24 changes: 0 additions & 24 deletions bandit.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion pymodbus/server/simulator/http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def __init__(
self,
modbus_server: str = "server",
modbus_device: str = "device",
http_host: str = "0.0.0.0",
http_host: str = "localhost",
alexrudd2 marked this conversation as resolved.
Show resolved Hide resolved
http_port: int = 8080,
log_file: str = "server.log",
json_file: str = "setup.json",
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ sphinx-rtd-theme==1.1.1
# development, everything needed to develop/test/check.
# -------------------------------------------------------------------
# install:development
bandit==1.7.4
codespell==2.2.2
coverage==7.1.0
mypy==1.0.1
Expand Down
4 changes: 3 additions & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ ignore = [
"E501", # line too long
"E731", # lambda expressions
"PT019", # Bug: https://github.com/m-burst/flake8-pytest-style/issues/202
"S101", # Use of `assert`
"S311", # PRNG for cryptography
]
line-length = 120
select = [
# "B", # bandit
"B007", # Loop control variable {name} not used within loop body
"B014", # Exception handler with duplicate exception
"C", # complexity
Expand All @@ -27,6 +28,7 @@ select = [
"PLC", # pylint
"PT", # flake8-pytest-style
"RUF", # ruff builtins
"S", # bandit
"SIM105", # flake8-simplify
"SIM117", #
"SIM118", #
Expand Down