-
Notifications
You must be signed in to change notification settings - Fork 100
/
setup.cfg
68 lines (54 loc) · 2.04 KB
/
setup.cfg
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
# -----------------------------------------------------------------------------
# pytest
# -----------------------------------------------------------------------------
[tool:pytest]
testpaths = tests
addopts = --verbose
[aliases]
test = pytest
# -----------------------------------------------------------------------------
# coverage
# -----------------------------------------------------------------------------
[coverage:report]
# Coverage couldn't detect backward functions because they are called by C++.
# Append "# pragma: no cover" to the definition lines to ignore them.
# https://www.janfreyberg.com/blog/2019-04-01-testing-pytorch-functions/
exclude_lines = pragma: no cover
# -----------------------------------------------------------------------------
# flake8
# -----------------------------------------------------------------------------
[flake8]
max_line_length = 99
ignore =
# E226 missing whitespace around arithmetic operator
# Ignoring it allows formula code like '1*2 + 3*4'.
E226,
# E704 multiple statements on one line (def)
# Allow bare function bodies for mypy.
E704,
exclude = build
# -----------------------------------------------------------------------------
# isort
# -----------------------------------------------------------------------------
[isort]
line_length = 99
# Don't split "import" and "from".
force_sort_within_sections = true
# -----------------------------------------------------------------------------
# mypy
# -----------------------------------------------------------------------------
# Docs for mypy config: https://mypy.readthedocs.io/en/latest/config_file.html
[mypy]
mypy_path = ./stubs/
follow_imports = normal
# This project must be strictly typed.
[mypy-torchgpipe.*]
check_untyped_defs = true
disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_incomplete_defs = true
warn_unused_ignores = true
# Ignore missing imports from untyped third-party libraries.
[mypy-torch.*,torchvision.*,setuptools.*,pytest.*]
ignore_missing_imports = true