Skip to content

Commit 5c5a3d6

Browse files
committed
Update project setup
1 parent cda7434 commit 5c5a3d6

File tree

4 files changed

+32
-28
lines changed

4 files changed

+32
-28
lines changed

pyproject.toml

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
11
[build-system]
22
requires = ["setuptools"]
33
build-backend = "setuptools.build_meta"
4+
5+
[tool.ruff]
6+
target-version = "py38"
7+
line-length = 120
8+
9+
[tool.ruff.lint]
10+
select = ["E", "W", "F", "C", "I", "D", "S", "UP", "B", "ISC", "G", "RSE"]
11+
ignore = ["D105", "D106", "D107", "UP032"]
12+
13+
[tool.ruff.lint.per-file-ignores]
14+
"tests.py" = ["D1", "S101", "S105", "S106", "S107", "B015", "B018"]
15+
16+
[tool.ruff.lint.isort]
17+
combine-as-imports = true
18+
19+
[tool.ruff.lint.mccabe]
20+
max-complexity = 10
21+
22+
[tool.ruff.lint.pycodestyle]
23+
max-doc-length = 120
24+
25+
[tool.ruff.lint.pydocstyle]
26+
convention = "google"

setup.cfg

+1-17
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,14 @@ tox =
3737

3838
[options.extras_require]
3939
quality =
40-
bandit
4140
doc8
42-
flake8
43-
isort
4441
mypy
45-
pydocstyle
42+
ruff
4643

4744
[doc8]
4845
max-line-length = 120
4946
allow-long-titles = true
5047

51-
[flake8]
52-
max-line-length = 120
53-
max-complexity = 10
54-
55-
[isort]
56-
line_length = 120
57-
combine_as_imports = true
58-
5948
[mypy]
6049
ignore_missing_imports = true
6150
disallow_untyped_defs = true
@@ -67,8 +56,3 @@ warn_unused_ignores = false
6756

6857
[mypy-tests]
6958
disallow_untyped_defs = false
70-
71-
[pydocstyle]
72-
convention = google
73-
add_ignore = D105,D106,D107
74-
add_select = D204,D400,D401

tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_other_env(self):
8787
class ToxAddEnvConfigTest(TestCase):
8888
def _test(self, env_name: str, initial_deps: str, result: List[str]) -> None:
8989
root = Path(__file__).parent
90-
source = IniSource(Path('/tmp/does/not/exist'), '') # nosec
90+
source = IniSource(Path('/tmp/does/not/exist'), '') # noqa: S108
9191
parsed = Parsed(override=(), root_dir=root, work_dir=root)
9292
state = State(Options(parsed, None, source, sentinel.cmd_handlers, sentinel.tox_handler), [])
9393

tox.ini

+7-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
isolated_build = true
2+
minversion = 4.4.0
33
envlist =
44
clear-coverage
55
quality
@@ -19,13 +19,15 @@ deps =
1919
coverage
2020
tox3: tox == 3.*
2121
tox4: tox == 4.*
22+
skip_install =
23+
coverage: true
2224
commands =
2325
coverage run --parallel-mode --include=tox_ipdb.py,tests.py --branch -m unittest {posargs:discover}
26+
constrain_package_deps = true
27+
use_frozen_constraints = true
2428

2529
[testenv:clear-coverage]
2630
depends =
27-
# Use single virtualenv for both coverage envs.
28-
envdir = {toxworkdir}/coverage
2931
commands =
3032
coverage erase
3133

@@ -36,8 +38,6 @@ depends =
3638
py310-tox{3,4}
3739
py311-tox{3,4}
3840
py312-tox{3,4}
39-
# Use single virtualenv for both coverage envs.
40-
envdir = {toxworkdir}/coverage
4141
parallel_show_output = true
4242
commands =
4343
coverage combine
@@ -50,9 +50,6 @@ extras =
5050
# Do not fail on first error, but run all the checks
5151
ignore_errors = true
5252
commands =
53-
isort --check-only --diff tox_ipdb.py tests.py
54-
flake8 --format=pylint --show-source tox_ipdb.py tests.py
55-
bandit --recursive tox_ipdb.py tests.py
56-
pydocstyle tox_ipdb.py
57-
mypy --show-error-codes tox_ipdb.py tests.py
53+
ruff check tox_ipdb.py tests.py
54+
mypy tox_ipdb.py tests.py
5855
doc8 CHANGELOG.rst README.rst

0 commit comments

Comments
 (0)