forked from onnx/onnx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.cfg
98 lines (87 loc) · 2.45 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# SPDX-License-Identifier: Apache-2.0
[aliases]
test=pytest
[tool:pytest]
addopts = --nbval --current-env
testpaths = onnx/test onnx/examples
[metadata]
license_files = LICENSE
classifiers =
Programming Language :: Python :: 3
[flake8]
select = B,C,E,F,P,T4,W,B9
max-line-length = 88
### DEFAULT IGNORES FOR 4-space INDENTED PROJECTS ###
# E127, E128 are hard to silence in certain nested formatting situations.
# E265, E266 talk about comment formatting which is too opinionated.
# E402 warns on imports coming after statements. There are important use cases
# like demandimport (https://fburl.com/demandimport) that require statements
# before imports.
# E501 is not flexible enough, we're using B950 instead.
# E722 is a duplicate of B001.
# F405 is hard to silence since we indeed do star import
# P207 is a duplicate of B003.
# P208 is a duplicate of C403.
# W503 talks about operator formatting which is too opinionated.
# F401 clashes with PEP484 requiring us to import types that are only used in
# type comments.
# E203 is need to support black formatting.
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html
ignore = E127, E128, E265, E266, E402, E501, E722, F405, P207, P208, W503, F401, E203
exclude =
.git,
__pycache__,
build/*,
third_party/*,
*_pb2.py,
.cache/*,
.eggs,
.setuptools-cmake-build/*,
[mypy]
# follow-imports = silent # TODO remove this
mypy_path = stubs:third_party/pybind11
strict_optional = True
warn_return_any = True
warn_no_return = True
# TODO warn_unused_ignores = True
warn_redundant_casts = True
warn_incomplete_stub = True
# TODO disallow_untyped_calls = True
check_untyped_defs = True
disallow_any_generics = True
no_implicit_optional = True
# TODO disallow_incomplete_defs = True
# TODO disallow_subclassing_any = True
disallow_untyped_decorators = True
warn_unused_configs = True
show_error_codes = True
show_column_numbers = True
ignore_missing_imports = True
exclude = (?x)(
\.git
| __pycache__
| ^build
| ^third_party
| _pb2.py$
| \.cache
| \.eggs
| \.setuptools-cmake-build
| venv/
)
[mypy-onnx.*]
disallow_untyped_defs = True
[mypy-tools.*]
disallow_untyped_defs = True
# Ignore errors in setup.py
[mypy-setup]
ignore_errors = True
[pylint.messages_control]
disable =
missing-docstring,
import-error,
no-member,
line-too-long,
fixme,
too-few-public-methods,
no-name-in-module,
invalid-name, # TODO: Add naming guidance and enable this check.