chore(test): unify configs into pyproject.toml
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
[run]
|
|
||||||
branch = True
|
|
||||||
omit = */build/*,tests/*,main.py
|
|
||||||
[report]
|
|
||||||
exclude_lines =
|
|
||||||
pragma: no cover
|
|
||||||
raise NotImplementedError.*
|
|
||||||
@@ -71,3 +71,67 @@ markers = [
|
|||||||
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
|
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
source = ["src"]
|
||||||
|
branch = true
|
||||||
|
omit = [
|
||||||
|
"*/tests/*",
|
||||||
|
"*/test_*.py",
|
||||||
|
"*/__pycache__/*",
|
||||||
|
"*/.venv/*",
|
||||||
|
"*/site-packages/*",
|
||||||
|
"test.py",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.coverage.report]
|
||||||
|
precision = 2
|
||||||
|
show_missing = true
|
||||||
|
skip_covered = false
|
||||||
|
exclude_lines = [
|
||||||
|
"pragma: no cover",
|
||||||
|
"def __repr__",
|
||||||
|
"raise AssertionError",
|
||||||
|
"raise NotImplementedError",
|
||||||
|
"if __name__ == .__main__.",
|
||||||
|
"if TYPE_CHECKING:",
|
||||||
|
"@abstractmethod",
|
||||||
|
"@abc.abstractmethod",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.coverage.html]
|
||||||
|
directory = "htmlcov"
|
||||||
|
|
||||||
|
[tool.mypy]
|
||||||
|
python_version = "3.13"
|
||||||
|
warn_return_any = true
|
||||||
|
warn_unused_configs = true
|
||||||
|
disallow_untyped_defs = false
|
||||||
|
disallow_incomplete_defs = false
|
||||||
|
check_untyped_defs = true
|
||||||
|
no_implicit_optional = true
|
||||||
|
warn_redundant_casts = true
|
||||||
|
warn_unused_ignores = true
|
||||||
|
warn_no_return = true
|
||||||
|
strict_equality = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = "tests.*"
|
||||||
|
ignore_errors = true
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = [
|
||||||
|
"regex.*",
|
||||||
|
"requests.*",
|
||||||
|
"bs4.*",
|
||||||
|
"ratelimit.*",
|
||||||
|
"pytest.*",
|
||||||
|
"pytest_mock.*",
|
||||||
|
"bibapi._transformers",
|
||||||
|
"bibapi.webrequest",
|
||||||
|
"bibapi.catalogue",
|
||||||
|
"bibapi.lehmanns",
|
||||||
|
"bibapi.schemas.bookdata",
|
||||||
|
"bibapi.sru",
|
||||||
|
]
|
||||||
|
ignore_missing_imports = true
|
||||||
|
ignore_errors = true
|
||||||
|
|||||||
Reference in New Issue
Block a user