-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsetup.cfg
137 lines (121 loc) · 3.71 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
[metadata]
name = pydsdl
version = attr: pydsdl.__version__
author = OpenCyphal
author_email = [email protected]
url = https://opencyphal.org
description = Cyphal DSDL processing frontend
long_description = file: README.md
long_description_content_type = text/markdown
license = MIT
keywords = cyphal, opencyphal, uavcan, dsdl, parser, compiler
classifiers =
Intended Audience :: Developers
Topic :: Scientific/Engineering
Topic :: Software Development :: Embedded Systems
Topic :: Software Development :: Libraries
Topic :: System :: Distributed Computing
Topic :: System :: Networking
License :: OSI Approved :: MIT License
Programming Language :: Python
Programming Language :: Python :: 3
[options]
zip_safe = False
include_package_data = True
# Search for PEP420 namespace packages, which we use in the third_party directory.
packages = find_namespace:
[options.packages.find]
where = .
include = pydsdl*
[options.package_data]
* = *
# -------------------------------------------------- PYTEST --------------------------------------------------
[tool:pytest]
testpaths = pydsdl
norecursedirs = third_party
python_files = *.py
python_classes = _UnitTest
python_functions = _unittest_
log_file = pytest.log
log_level = DEBUG
log_cli = true
log_cli_level = WARNING
addopts = --doctest-modules -v -p no:unraisableexception
# -------------------------------------------------- MYPY --------------------------------------------------
[mypy]
# Python version is not specified to allow checking against different versions
warn_return_any = True
warn_unused_configs = True
disallow_untyped_defs = True
check_untyped_defs = True
no_implicit_optional = True
warn_redundant_casts = True
warn_unused_ignores = True
show_error_context = True
strict_equality = True
implicit_reexport = False
incremental = False
exclude = pydsdl/third_party
[mypy-pytest.*]
ignore_missing_imports = True
[mypy-parsimonious.*]
ignore_errors = True
implicit_reexport = True
# -------------------------------------------------- COVERAGE --------------------------------------------------
[coverage:run]
source = pydsdl
branch = True
omit =
*/third_party/*
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
raise AssertionError
raise NotImplementedError
assert False
if False:
if __name__ == .__main__.:
# -------------------------------------------------- PYLINT --------------------------------------------------
[pylint.MASTER]
fail-under=9.9
[pylint.MESSAGES CONTROL]
# Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=UNDEFINED
# Advanced semantic analysis is broken in PyLint so we just disable these checks since they add nothing but noise.
# These aspects are addressed by MyPy in a more sensible way.
# Formatting issues like superfluous parens are managed by Black automatically.
disable=
cyclic-import,
useless-import-alias,
import-outside-toplevel,
fixme,
inconsistent-return-statements,
unbalanced-tuple-unpacking,
no-name-in-module,
superfluous-parens,
unsubscriptable-object,
too-few-public-methods,
import-error,
no-self-use,
multiple-statements,
arguments-differ,
too-many-statements,
useless-super-delegation,
too-many-instance-attributes,
too-many-public-methods,
consider-using-f-string,
unspecified-encoding,
use-implicit-booleaness-not-comparison
[pylint.REPORTS]
output-format=colorized
[pylint.DESIGN]
max-branches=20
[pylint.FORMAT]
max-line-length=120
max-module-lines=3000
[pylint.BASIC]
bad-names=
variable-rgx=[a-z_][a-z0-9_]*
[pylint.SIMILARITIES]
min-similarity-lines=20