Skip to content

Commit e379507

Browse files
committed
replace black and isort for ruff. I still haven't replaced ruff with pylint
Signed-off-by: E3E <ntanzill@purdue.edu>
1 parent 8f95162 commit e379507

3 files changed

Lines changed: 8 additions & 21 deletions

File tree

pyproject.toml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,13 @@ include = [
7575
# from `tests` so the root directory must be added to Python's path for editable installations
7676
dev-mode-dirs = ["."]
7777

78-
# Black section
79-
# Read more here: https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
80-
[tool.black]
78+
# Ruff section
79+
# Read more here: https://docs.astral.sh/ruff/linter/#rule-selection
80+
[tool.ruff]
8181
line-length=80
8282

83-
# Isort section
84-
# Read more here: https://pycqa.github.io/isort/docs/configuration/config_files.html
85-
[tool.isort]
86-
profile="black"
87-
line_length=80
88-
known_first_party = ["tuf"]
83+
[tool.ruff.lint]
84+
ignore = ["D400","D415","D213","D205","D202","D107","D407","D413","D212","D104","D406","D105","D411","D401","D200","D203"]
8985

9086
# Pylint section
9187

@@ -156,7 +152,3 @@ module = [
156152
"securesystemslib.*",
157153
]
158154
ignore_missing_imports = "True"
159-
160-
[tool.pydocstyle]
161-
inherit = false
162-
ignore = "D400,D415,D213,D205,D202,D107,D407,D413,D212,D104,D406,D105,D411,D401,D200,D203"

requirements/lint.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
# Lint tools
77
# (We are not so interested in the specific versions of the tools: the versions
88
# are pinned to prevent unexpected linting failures when tools update)
9-
black==24.2.0
10-
isort==5.13.2
119
pylint==3.0.3
10+
ruff==0.2.1
1211
mypy==1.8.0
1312
bandit==1.7.7
14-
pydocstyle==6.3.0

tox.ini

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,13 @@ deps =
4747
--editable {toxinidir}
4848
lint_dirs = tuf examples tests verify_release
4949
commands =
50-
black --check --diff {[testenv:lint]lint_dirs}
51-
isort --check --diff {[testenv:lint]lint_dirs}
50+
ruff --check --diff {[testenv:lint]lint_dirs}
5251
pylint -j 0 --rcfile=pyproject.toml {[testenv:lint]lint_dirs}
5352

5453
mypy {[testenv:lint]lint_dirs}
55-
54+
5655
bandit -r tuf
5756

58-
pydocstyle tuf
59-
6057
[testenv:docs]
6158
deps =
6259
-r{toxinidir}/requirements/docs.txt

0 commit comments

Comments
 (0)