-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.cfg
101 lines (83 loc) · 3.3 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
99
100
101
# Copyright 2022 Bloomberg Finance L.P.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[coverage:report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
# Don't complain if non-runnable code isn't run:
if __name__ == .__main__.:
ignore_errors = True
[tool:pytest]
addopts = -vv --doctest-modules --doctest-report ndiff --instafail
doctest_optionflags= NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ELLIPSIS NUMBER
testpaths = tests
[flake8]
# W503 ignore line break occurred before a binary operator
# E203 ignore because it is not PEP 8 compliant https://github.com/ambv/black/issues/315
# E501 and B950 disable default 'line-too-long' warning, see https://github.com/ambv/black#line-length
# WPS210 ignore too many local variables
# WPS213 ignore too many expressions
# C81* ignore missing trailing comma as it is stricter than black
# WPS305 no f strings allowed
# WPS337 ignore multiline condition violations
# WPS348 ignore lines starting with a dot as black does this
# WPS331 ignore variables that are only used for `return`
# WPS503 ignore useless returning `else` statement
# WPS507 ignore useless `len()` compare
# WPS214 Found too many methods: 10 > 7
# WPS221 Found line with high Jones Complexity
# WPS110 Found wrong variable name
# WPS204 Found overused expression
# WPS440 Found block variables overlap - false positives
# WPS441 Found control variable used after block - false positives
# WPS220 Found too deep nesting
ignore = W503,E203,B950,E501,C81,WPS210,WPS213,WPS305,WPS337,WPS348,WPS331,WPS503,WPS507,WPS214,WPS221,WPS110,WPS204,WPS440,WPS441,WPS220
min-name-length = 1
max-try-body-length = 2
# emit a warning if the McCabe complexity of a function
# is higher than the value
max-complexity = 18
# select the error codes you wish Flake8 to report
# see http://flake8.pycqa.org/en/2.5.5/warnings.html
select = B,C,E,F,N400,N8,W,T4
exclude = tests, .venv, build
[isort]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88
combine_as_imports=True
[mypy]
# The following is because of mypy/torchscript incompatibility
# see https://github.com/pytorch/pytorch/issues/48643
# set to True when torch is updated, and sequence_model.py L146 can be
# marked with type: ignore
warn_unreachable = False
ignore_missing_imports = True
warn_redundant_casts = True
warn_return_any = True
warn_unused_ignores = True
warn_unused_configs = True
no_implicit_optional = True
namespace_packages = True
explicit_package_bases = True
show_error_context = True
[pydocstyle]
convention = google
match = (?!test_|_version|hf_).*\.py
[coverage:run]
branch = True
omit = minilmv2/hf_run_evaluation.py