-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.cfg
151 lines (133 loc) · 4.14 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#################
# mypy sections #
#################
# For a list of configurations go to https://mypy.readthedocs.io/en/stable/config_file.html
[mypy]
ignore_missing_imports = True
show_error_codes = True
files = safe_autonomy_sims
###################
# flake8 sections #
###################
# For a list of configurations go to https://flake8.pycqa.org/en/latest/user/configuration.html
[flake8]
# E266: too many leading ‘#’ for block comment
# W503: line break before binary operator
# W504: line break after binary operator
# C901: Function is too complex
ignore = E266, W503, W504, C901
exclude = test/*
max-line-length = 140
max-complexity = 18
select = B,C,E,F,W,T4
extend-ignore = E203
###################
# pylint sections #
###################
# For a list of configurations go to https://www.getcodeflow.com/pylint-configuration.html
[pylint.'MESSAGES CONTROL']
# for a list of messages go to https://github.com/janjur/readable-pylint-messages
# Names of some of the codes
# C0103: invalid-name
# C0326: bad-whitespace
# C0330: Wrong hanging indentation before block (add 4 spaces).
# R0801: Similar lines in 2 files
# W0511: fixme
# W1202: logging-format-interpolation
# W1203: logging-fstring-interpolation
min-public-methods=1
max-args=15
max-locals=25
max-line-length=140
max-attributes=15
max-parents=15
max-branches=20
# pydantic is not a regular and pylint fails at
# processing it correctly, this is the recommended way to
# get around pylint not working with pydantic
# https://github.com/samuelcolvin/pydantic/issues/1961
extension-pkg-whitelist=pydantic
# keep codes in order
# E0213, R0201, E1101, R0903 are all added because of pydantic, the validators false positive for these
disable = C0103, R0801, R0902, R0903, W0511, W1202, W1203, R0401, E0213, E1101
[pylint.TYPECHECK]
# can make these as specific or as broad as we want. Regex
generated-members=HealthCheckResponse*
[pylint.FORMAT]
max-line-length=140
###################
# pytest sections #
###################
# For a list of configurations go to https://docs.pytest.org/en/stable/customize.html
[tool:pytest]
testpaths=test
addopts = --strict-markers -m "not slow" --disable-pytest-warnings
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
serial
skipif_activemq_down
ray_debug_mode
integration
system_test: A test focused on verifying system features.
integration_test: A test focused on verifying interactions between system components.
unit_test: A test focused on verifying the behavior of a single class.
performance_test: A test focused on the performance of training.
junit_family=xunit1
###########################
# pytest coverage section #
###########################
# For a list of configurations go to https://pytest-cov.readthedocs.io/en/latest/config.html
# must manually tell pytest coverage to use this file with --cov-config=setup.cfg
[coverage:run]
branch = true
source = safe_autonomy_sims
[coverage:report]
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about missing debug-only code:
def __repr__
if self\.debug
# 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 0:
if __name__ == .__main__.:
#########
# black #
#########
[tool.black]
line-length=140
target-version=py37
#########
# isort #
#########
[isort]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
ensure_newline_before_comments = True
line_length=140
########
# yapf #
########
[yapf]
based_on_style=pep8
indent_width=4
spaces_before_comment=2
COLUMN_LIMIT=140
# indent_closing_brackets=true
SPLIT_COMPLEX_COMPREHENSION=true
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF=true
DEDENT_CLOSING_BRACKETS=true
# this does not change Every dict, only ones longer than Column_Limit
EACH_DICT_ENTRY_ON_SEPARATE_LINE=true
DISABLE_ENDING_COMMA_HEURISTIC=false
SPLIT_ARGUMENTS_WHEN_COMMA_TERMINATED=false
# protect mypy typing
INDENT_BLANK_LINES=false
SPLIT_ALL_TOP_LEVEL_COMMA_SEPARATED_VALUES=true
SPLIT_BEFORE_ARITHMETIC_OPERATOR=false
SPLIT_BEFORE_DICT_SET_GENERATOR=true