Skip to content

Commit 722dd75

Browse files
henryiiiFFY00
authored andcommitted
MAINT: move config to pyproject.toml
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent f90f6f4 commit 722dd75

6 files changed

Lines changed: 33 additions & 30 deletions

File tree

.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
max-line-length = 127
3+
max-complexity = 10
4+
extend-ignore = E203

.github/workflows/tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
- name: Run tests
4949
run: >-
5050
python -m pytest --showlocals -vv --cov
51-
--cov-config setup.cfg
5251
--cov-report=xml:coverage-${{ matrix.python }}.xml
5352
5453
- name: Send coverage report
@@ -130,7 +129,6 @@ jobs:
130129
- name: Run tests
131130
run: >-
132131
python -m pytest --showlocals -vv --cov
133-
--cov-config setup.cfg
134132
--cov-report=xml:coverage-${{ matrix.python }}.xml
135133
shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
136134

@@ -169,7 +167,6 @@ jobs:
169167
- name: Run tests
170168
run: >-
171169
pyston -m pytest --showlocals -vv --cov
172-
--cov-config setup.cfg
173170
--cov-report=xml:coverage-pyston.xml
174171
175172
- name: Send coverage report
@@ -223,7 +220,6 @@ jobs:
223220
- name: Run tests
224221
run: >-
225222
python -m pytest --showlocals -vv --cov
226-
--cov-config setup.cfg
227223
--cov-report=xml:coverage-homebrew-${{ matrix.python }}.xml
228224
229225
- name: Send coverage report

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ docs/_build
33
*.pyc
44
.cache/
55
dist/
6+
.coverage

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test(session):
4949
session.run(
5050
'pytest',
5151
'--showlocals', '-vv',
52-
'--cov', '--cov-config', 'setup.cfg',
52+
'--cov',
5353
f'--cov-report=html:{htmlcov_output}',
5454
f'--cov-report=xml:{xmlcov_output}',
5555
*session.posargs

pyproject.toml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ dynamic = [
4040
[project.optional-dependencies]
4141
test = [
4242
'build',
43-
'pytest',
44-
'pytest-cov',
43+
'pytest>=6.0',
44+
'pytest-cov[toml]',
4545
'pytest-mock',
4646
'auditwheel',
4747
'Cython',
@@ -59,3 +59,28 @@ homepage = 'https://github.com/mesonbuild/meson-python'
5959
repository = 'https://github.com/mesonbuild/meson-python'
6060
documentation = 'https://meson-python.readthedocs.io/'
6161
changelog = 'https://meson-python.readthedocs.io/en/latest/changelog.html'
62+
63+
64+
[tool.mypy]
65+
show_error_codes = true
66+
ignore_missing_imports = true
67+
strict = true
68+
69+
70+
[tool.isort]
71+
lines_between_types = 1
72+
lines_after_imports = 2
73+
multi_line_output = 5
74+
known_first_party = "mesonpy"
75+
76+
77+
[tool.coverage.html]
78+
show_contexts = true
79+
80+
81+
[tool.pytest.ini_options]
82+
minversion = "6.0"
83+
addopts = ["-ra", "--strict-markers", "--strict-config"]
84+
log_cli_level = "info"
85+
norecursedirs = "tests/packages/*"
86+
testpaths = ["tests"]

setup.cfg

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

0 commit comments

Comments
 (0)