Skip to content

Commit 6d6e442

Browse files
committed
Move pylint and coverage configs to pyproject.toml
1 parent 0543015 commit 6d6e442

File tree

6 files changed

+32
-65
lines changed

6 files changed

+32
-65
lines changed

.coveragerc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.pylintrc

Lines changed: 0 additions & 49 deletions
This file was deleted.

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
VERSION := $(shell python setup.py --version)
22

3+
export COVERAGE_RCFILE := pyproject.toml
34

45
clean:
56
# Clean sources
@@ -35,9 +36,9 @@ uninstall:
3536
test:
3637
# Unit tests with coverage report
3738
coverage erase
38-
coverage run --rcfile=./.coveragerc -m pytest -c tests/.configs/pytest.ini
39-
coverage report --rcfile=./.coveragerc
40-
coverage html --rcfile=./.coveragerc
39+
coverage run -m pytest -c tests/.configs/pytest.ini
40+
coverage report
41+
coverage html
4142

4243
check:
4344
flake8 src/dependency_injector/

pyproject.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,25 @@ dependency_injector = ["*.pxd", "*.pyi", "py.typed"]
7777

7878
[tool.setuptools.dynamic]
7979
version = {attr = "dependency_injector.__version__"}
80+
81+
[tool.coverage.run]
82+
branch = false
83+
relative_files = true
84+
source_pkgs = ["dependency_injector"]
85+
plugins = ["Cython.Coverage"]
86+
87+
[tool.coverage.html]
88+
directory = "reports/unittests/"
89+
90+
[tool.coverage.report]
91+
show_missing = true
92+
93+
[tool.isort]
94+
profile = "black"
95+
96+
[tool.pylint.main]
97+
ignore = ["tests"]
98+
99+
[tool.pylint.design]
100+
min-public-methods = 0
101+
max-public-methods = 30

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pytest-asyncio
55
tox
66
coverage
77
flake8
8+
flake8-pyproject
89
pydocstyle
910
sphinx_autobuild
1011
pip

tox.ini

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ extras=
2323
yaml
2424
commands = pytest -c tests/.configs/pytest.ini
2525
python_files = test_*_py3*.py
26+
setenv =
27+
COVERAGE_RCFILE = pyproject.toml
2628

2729
[testenv:.pkg]
2830
passenv = DEPENDENCY_INJECTOR_*
@@ -37,8 +39,8 @@ deps=
3739
coveralls>=4
3840
commands=
3941
coverage erase
40-
coverage run --rcfile=./.coveragerc -m pytest -c tests/.configs/pytest.ini
41-
coverage report --rcfile=./.coveragerc
42+
coverage run -m pytest -c tests/.configs/pytest.ini
43+
coverage report
4244
coveralls
4345

4446
[testenv:pypy3.9]
@@ -63,7 +65,7 @@ deps=
6365
flask<2.2
6466
werkzeug<=2.2.2
6567
commands=
66-
- pylint -f colorized --rcfile=./.pylintrc src/dependency_injector
68+
- pylint -f colorized src/dependency_injector
6769

6870
[testenv:flake8]
6971
deps=

0 commit comments

Comments
 (0)