Skip to content

Commit e1cfb4c

Browse files
authored
centralize tools config in pyproject.toml (#1463)
1 parent 9fceef1 commit e1cfb4c

File tree

2 files changed

+20
-18
lines changed

2 files changed

+20
-18
lines changed

pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,26 @@ check-hidden = true
5454
ignore-regex = '.*pragma: codespell-ignore.*'
5555
ignore-words-list = 'assertIn'
5656

57+
[tool.coverage.run]
58+
source = ["oauth2_provider"]
59+
omit = ["*/migrations/*"]
60+
61+
[tool.coverage.report]
62+
show_missing = true
63+
64+
[tool.pytest.ini_options]
65+
django_find_project = false
66+
addopts = [
67+
"--cov=oauth2_provider",
68+
"--cov-report=",
69+
"--cov-append",
70+
"-s"
71+
]
72+
markers = [
73+
"oauth2_settings: Custom OAuth2 settings to use - use with oauth2_settings fixture",
74+
"nologinrequiredmiddleware",
75+
]
76+
5777
[tool.ruff]
5878
line-length = 110
5979
exclude = [".tox", "build/", "dist/", "docs/", "oauth2_provider/migrations/", "tests/migrations/", "manage.py"]

tox.ini

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@ DJANGO =
2525
5.1: dj51
2626
main: djmain
2727

28-
[pytest]
29-
django_find_project = false
30-
addopts =
31-
--cov=oauth2_provider
32-
--cov-report=
33-
--cov-append
34-
-s
35-
markers =
36-
oauth2_settings: Custom OAuth2 settings to use - use with oauth2_settings fixture
37-
nologinrequiredmiddleware
38-
3928
[testenv]
4029
commands =
4130
pytest {posargs}
@@ -124,10 +113,3 @@ commands =
124113
rm -rf dist
125114
python -m build
126115
twine check dist/*
127-
128-
[coverage:run]
129-
source = oauth2_provider
130-
omit = */migrations/*
131-
132-
[coverage:report]
133-
show_missing = True

0 commit comments

Comments
 (0)