-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
83 lines (74 loc) · 2.78 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
73
74
75
76
77
78
79
80
81
82
83
# For TOML reference
# https://learnxinyminutes.com/docs/toml/
[tool.pytest.ini_options]
testpaths = ["tests"] # path to the test directory
minversion = "3.8"
addopts = "--cov=imfas" # Should be package name
[tool.coverage.run]
branch = true
context = "imfas" # Should be package name
omit = [
"imfas/__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 = ['py38']
line-length = 120
[tool.isort]
py_version = "38"
profile = "black" # Play nicely with black
src_paths = ["imfas", "tests"]
known_types = ["typing", "abc"] # We put these in their own section "types"
known_test = ["tests"]
known_first_party = ["imfas"]
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
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line required between summary and description
"D210", # No whitespaces allowed surrounding docstring text
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D400", # First line should end with a period
"D401", # First line should be in imperative mood
"D404", # First word of docstring should not be this
"D413", # Missing blank line after last section
"D415", # First line should end with a period, question mark, or exclamation point
]
[tool.mypy]
python_version = "3.8"
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 = false # prefer explicit ignores
disallow_untyped_defs = true # All functions must have types
disallow_untyped_decorators = true # ... even decorators
disallow_incomplete_defs = true # ... all types
[[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.8
disallow_untyped_decorators = false # decorators in testing are not all annotated