Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
10 changes: 0 additions & 10 deletions .flake8

This file was deleted.

22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,25 @@ load-test = "llm_load_test.load_test:main"

[tool.pdm]
distribution = true

[tool.ruff]
line-length = 120
fix = true

[tool.ruff.lint]
select = [
"F", # pyflakes
"B", # flake8-bugbear
"D", # pydocstyle
"I", # isort
"PL", # pylint

# "E", # pycodestyle
# "UP", # pyupgrade,
# "S", # bandit
# "N", # pep8-naming
]
ignore = [
"D203", # conflicts with D211
"D212", # conflicts with D213
]
7 changes: 1 addition & 6 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
bashate
flake8
flake8-bugbear
flake8-colors
flake8-docstrings
flake8-import-order
pylint
ruff
pyyaml
tox
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,24 @@ commands =
#
# Begin linters
#
[testenv:flake8]
[testenv:format]
envdir = {toxworkdir}/linters
deps = {[testenv:linters]deps}
commands =
bash -c 'python -m flake8 $(find src/ -name "*.py")'
bash -c 'python -m ruff format .'

[testenv:pylint]
[testenv:lint]
envdir = {toxworkdir}/linters
deps = {[testenv:linters]deps}
commands =
bash -c 'python -m pylint $(find src/ -name "*.py")'
bash -c 'python -m ruff check . --fix'

[testenv:linters]
deps =
-r{toxinidir}/test-requirements.txt
commands =
{[testenv:flake8]commands}
{[testenv:format]commands}
{[testenv:lint]commands}
# TODO: Also enable pylint in a follow-up PR
# {[testenv:pylint]commands}
#
Expand Down