"vscode:/vscode.git/clone" did not exist on "38569ef02d259741cb8ebc47bf7979ea43ab3616"
setup.cfg 2.29 KB
Newer Older
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
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
# -----------------------------------------------------------------------------
# pytest
# -----------------------------------------------------------------------------

[tool:pytest]
testpaths = tests
addopts = --verbose
junit_family = xunit2

[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]
select = B,C,E,F,P,T4,W,B9
max-line-length = 120
# C408 ignored because we like the dict keyword argument syntax
# E501 is not flexible enough, we're using B950 instead
ignore =
    E203,E305,E402,E501,E721,E741,F403,F405,F821,F841,F999,W503,W504,C408,E302,W291,E303,
per-file-ignores = __init__.py: F401
exclude = build,*.pyi,.git

# -----------------------------------------------------------------------------
# isort
# -----------------------------------------------------------------------------

[isort]
line_length = 120
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
skip_glob = build/*,stubs/*
# Don't split "import" and "from".
force_sort_within_sections = true
50
known_third_party = pytest,setuptools,torch,torchtext
Mandeep Singh Baines's avatar
Mandeep Singh Baines committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

# -----------------------------------------------------------------------------
# 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-fairscale.*]
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