-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.cfg
110 lines (95 loc) · 3.93 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
#
# This file is used to configure all tools that support .cfg config file format. Currently all tools
# except the Black formatter (this tool is configured in a .toml file, since it is the only accepted config file format)
#
# ────────────────────────────────────────── Formatting ────────────────────────────────────────── #
[isort]
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
line_length = 120
#profile = black
# ─────────────────────────────────────────── Linting ──────────────────────────────────────────── #
[flake8]
max-line-length = 120
max-complexity = 18
exclude =
tests/data
# it's not a bug that we aren't using all of hacking, ignore:
# H101: Use TODO(NAME)
# H403: multi line docstrings should end on a new line
# H404: multi line docstring should start without a leading new line
# H405: multi line docstring summary not separated with an empty line
# W503: line break before binary operator
ignore = H101,W503
# rules
# B: flake8-bugbear
# C: Detection of circulate complexity by McCabe
# E: pycodestyle: Error of pep8
# W: pycodestyle: Warning of pep8
# F: Detection of PyFlakes
# T4
select = B,C,E,W,F,T4
extend-ignore = E203
[pylint]
max-line-length = 120
[pylint.messages_control]
disable = C0330, C0326
[pycodestyle]
max-args = 20
ignore =
tests/data
good-names = i,j,k,ex,_,e,db,df,ms,ts
ignored-argument-names = args|kwargs
# it's not a bug that we aren't using all of hacking, ignore:
# C0114: Missing module docstring (missing-module-docstring)
# C0115: Missing class docstring (missing-class-docstring)
# C0116: Missing function or method docstring (missing-function-docstring)
# C0411: third party import "from tests_base..." should be placed before "from library_template..." (wrong-import-order)
# E0611: No name 'BaseModel' in module 'pydantic' (no-name-in-module)
# R0902: Too many instance attributes (9/7) (too-many-instance-attributes)
# R0903: Too few public methods (0/2) (too-few-public-methods)
# R0904: Too many public methods (27/20) (too-many-public-methods)
# R0911: Too many return statements (8/6) (too-many-return-statements)
# W1202: Use lazy % formatting in logging functions (logging-format-interpolation)
# W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)
# W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
# R0801: Similar lines in 2 files => Waiting for this PR to enable again: https://github.com/PyCQA/pylint/issues/214
disable = C0114,C0115,C0116,C0411,E0611,R0902,R0903,R0904,R0911,W1202,W1203,W0707,R0801
[pydantic-mypy]
init_forbid_extra = True
init_typed = True
warn_required_dynamic_aliases = True
warn_untyped_fields = True
[mypy]
python_version = 3.8
files = src,tests
disable_error_code = attr-defined
plugins = pydantic.mypy
# ─────────────────────────────────────────── Testing ──────────────────────────────────────────── #
[tool:pytest]
testpaths = tests
python_files = test_*.py
markers =
slow: Indicates that the test may take time to complete (disable with '-m "not slow"')
addopts =
-p no:cacheprovider
-ra
--strict-markers
--verbose
--cov-config=.coveragerc
--cov=src
--cov-report=term
--cov-report=html:docs/coverage
--cov-report=xml:docs/coverage/coverage.xml
--junitxml=docs/test/junit/test-results.xml
--verbose
--cache-clear
-m "not slow"
[coverage:run]
omit =
[coverage:report]
exclude_lines =
pragma: no cover
@abstractmethod