-
Notifications
You must be signed in to change notification settings - Fork 11
/
pyproject.toml
72 lines (63 loc) · 2.17 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# For TOML reference
# https://learnxinyminutes.com/docs/toml/
[tool.pytest.ini_options]
testpaths = ["tests"] # path to the test directory
minversion = "3.9"
addopts = "--cov=deepcave" # Should be package name
[tool.coverage.run]
branch = true
context = "deepcave" # Should be package name
omit = [
"deepcave/__init__.py", # Has variables only needed for setup.py
]
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover",
'\.\.\.',
"raise NotImplementedError",
"if TYPE_CHECKING",
] # These are lines to exclude from coverage
[tool.black]
target-version = ['py39']
line-length = 100
[tool.isort]
py_version = "39"
profile = "black" # Play nicely with black
src_paths = ["deepcave", "tests"]
known_types = ["typing", "abc"] # We put these in their own section "types"
known_test = ["tests"]
known_first_party = ["deepcave"]
sections = [
"FUTURE",
"TYPES",
"STDLIB",
"THIRDPARTY",
"FIRSTPARTY",
"TEST",
"LOCALFOLDER",
] # section ordering
multi_line_output = 3 # https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html
[tool.pydocstyle]
convention = "numpy"
add-ignore = [ # http://www.pydocstyle.org/en/stable/error_codes.html
"D105", # Missing docstring in magic method
"D212", # Multi-line docstring summary should start at the first line
]
[tool.mypy]
python_version = "3.9"
show_error_codes = true
warn_unused_configs = true # warn about unused [tool.mypy] lines
follow_imports = "normal" # Type check top level api code we use from imports
ignore_missing_imports = true # prefer explicit ignores
disallow_untyped_defs = true # All functions must have types
disallow_untyped_decorators = true # ... even decorators
disallow_incomplete_defs = true # ... all types
check_untyped_defs = true # Problems are shown, even if def is check_untyped_defs
[[tool.mypy.overrides]]
module = ["setuptools.*"] # Add modules that give import errors here
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["tests.*"] # pytest uses decorators which are not typed in 3.9
disallow_untyped_decorators = false # decorators in testing are not all annotated