Skip to content

Commit

Permalink
Put mypy, coverage.py, pytest in pyproject (#1273)
Browse files Browse the repository at this point in the history
* Put mypy, coverage.py, pytest in pyproject

Signed-off-by: William Woodruff <william@trailofbits.com>

* tox: coverage[toml]

Signed-off-by: William Woodruff <william@trailofbits.com>

---------

Signed-off-by: William Woodruff <william@trailofbits.com>
  • Loading branch information
woodruffw authored Dec 5, 2023
1 parent acb31fb commit 5dc1044
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 43 deletions.
14 changes: 0 additions & 14 deletions .coveragerc

This file was deleted.

24 changes: 0 additions & 24 deletions mypy.ini

This file was deleted.

45 changes: 45 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
[tool.coverage.run]
branch = true
source = ["OpenSSL", "tests/"]

[tool.coverage.paths]
source = [
"src/OpenSSL",
".tox/*/lib/python*/site-packages/OpenSSL",
".tox/pypy/site-packages/OpenSSL",
]

[tool.coverage.report]
show_missing = true

[tool.mypy]
warn_unused_configs = true
follow_imports = "skip"
strict = true
exclude = ['SSL\.py$']

[[tool.mypy.overrides]]
module = "OpenSSL.crypto"
warn_return_any = false
disallow_any_expr = false

[[tool.mypy.overrides]]
module = "OpenSSL.rand"
warn_return_any = false

[[tool.mypy.overrides]]
module = "OpenSSL._util"
warn_return_any = false

[[tool.mypy.overrides]]
module = "cryptography.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "cffi.*"
ignore_missing_imports = true

[tool.pytest.ini_options]
addopts = "-r s --strict-markers"
testpaths = ["tests"]

[tool.ruff]
select = ['E', 'F', 'I', 'W', 'UP', 'RUF']
line-length = 79
Expand Down
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[tool:pytest]
addopts = "-r s --strict-markers"
testpaths = tests

[metadata]
# Ensure LICENSE is included in wheels.
license_file = LICENSE
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ commands =
sphinx-build -W -b html doc doc/_build/html {posargs}

[testenv:coverage-report]
deps = coverage>=4.2
deps = coverage[toml]>=4.2
skip_install = true
commands =
coverage combine
Expand Down

0 comments on commit 5dc1044

Please sign in to comment.