Skip to content

Commit 5dc1044

Browse files
authored
Put mypy, coverage.py, pytest in pyproject (#1273)
* Put mypy, coverage.py, pytest in pyproject Signed-off-by: William Woodruff <[email protected]> * tox: coverage[toml] Signed-off-by: William Woodruff <[email protected]> --------- Signed-off-by: William Woodruff <[email protected]>
1 parent acb31fb commit 5dc1044

File tree

5 files changed

+46
-43
lines changed

5 files changed

+46
-43
lines changed

.coveragerc

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

mypy.ini

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

pyproject.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
1+
[tool.coverage.run]
2+
branch = true
3+
source = ["OpenSSL", "tests/"]
4+
5+
[tool.coverage.paths]
6+
source = [
7+
"src/OpenSSL",
8+
".tox/*/lib/python*/site-packages/OpenSSL",
9+
".tox/pypy/site-packages/OpenSSL",
10+
]
11+
12+
[tool.coverage.report]
13+
show_missing = true
14+
15+
[tool.mypy]
16+
warn_unused_configs = true
17+
follow_imports = "skip"
18+
strict = true
19+
exclude = ['SSL\.py$']
20+
21+
[[tool.mypy.overrides]]
22+
module = "OpenSSL.crypto"
23+
warn_return_any = false
24+
disallow_any_expr = false
25+
26+
[[tool.mypy.overrides]]
27+
module = "OpenSSL.rand"
28+
warn_return_any = false
29+
30+
[[tool.mypy.overrides]]
31+
module = "OpenSSL._util"
32+
warn_return_any = false
33+
34+
[[tool.mypy.overrides]]
35+
module = "cryptography.*"
36+
ignore_missing_imports = true
37+
38+
[[tool.mypy.overrides]]
39+
module = "cffi.*"
40+
ignore_missing_imports = true
41+
42+
[tool.pytest.ini_options]
43+
addopts = "-r s --strict-markers"
44+
testpaths = ["tests"]
45+
146
[tool.ruff]
247
select = ['E', 'F', 'I', 'W', 'UP', 'RUF']
348
line-length = 79

setup.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[tool:pytest]
2-
addopts = "-r s --strict-markers"
3-
testpaths = tests
4-
51
[metadata]
62
# Ensure LICENSE is included in wheels.
73
license_file = LICENSE

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ commands =
7171
sphinx-build -W -b html doc doc/_build/html {posargs}
7272

7373
[testenv:coverage-report]
74-
deps = coverage>=4.2
74+
deps = coverage[toml]>=4.2
7575
skip_install = true
7676
commands =
7777
coverage combine

0 commit comments

Comments
 (0)