-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.cfg
169 lines (145 loc) · 3.5 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
[metadata]
name = dtsh
version = 0.2.4
author = Christophe Dufaza
author_email = [email protected]
description = Shell-like interface with Zephyr Devicetree
long_description = file: README.rst
license = Apache License version 2.0
url = https://github.com/dottspina/dtsh
keywords = devicetree, zephyr, dts, embedded
classifiers =
Development Status :: 5 - Production/Stable
Programming Language :: Python :: 3
Intended Audience :: Developers
Topic :: Software Development :: Embedded Systems
License :: OSI Approved :: Apache Software License
Programming Language :: Python :: 3 :: Only
[options]
python_requires = >=3.10
install_requires =
PyYAML>=6.0
rich
gnureadline ; sys_platform == 'darwin'
packages =
dtsh
dtsh.builtins
dtsh.rich
devicetree
package_dir =
= src
[options.package_data]
dtsh =
py.typed
dtsh.ini
dtsh.rich =
theme.ini
[options.entry_points]
console_scripts =
dtsh = dtsh.cli:run
[options.extras_require]
# Linters, type hinting, unit tests, etc.
dev =
pycodestyle
flake8
pylint
mypy
types-PyYAML
pytest
# IDE/LSP integration.
lsp =
python-lsp-server[all]
pylsp-mypy
python-lsp-black
# Package distribution only
dist =
build
twine
[tool:pytest]
pythonpath = src
testpaths = tests
[pycodestyle]
# References:
# - https://pycodestyle.pycqa.org/en/latest/intro.html#configuration
max-line-length = 80
[pydocstyle]
# References:
# - https://peps.python.org/pep-0257/
# - http://www.pydocstyle.org/en/stable/usage.html
# - https://google.github.io/styleguide/pyguide.html#Comments
#
# Cannot pass both ignore and convention (unfortunately).
#ignore = D105
# Relax pydocstyle for test source code.
convention = google
match_dir = ^(?!tests|build|\.venv).*
[pylint.]
# References:
# - https://pylint.readthedocs.io/en/latest/user_guide/usage/run.html
disable =
# invalid-name
# Fix: except Exception as e
C0103,
# too-many-ancestor
# Fix: _Loader(YAMLLoader)
R0901,
# too-many-instance-attributes
R0902,
# too-few-public-methods
# Example: abstract base class DTNodeCriterion
R0903,
# too-many-public-methods
R0904,
# too-many-return-statements
R0911,
# too-many-branches
R0912,
# too-many-function-args
R0913,
# too-many-locals
R0914,
# line-too-long
# Example: URL in docstrings
C0301,
# too-many-lines
# Example: dtsh.model module
C0302,
# missing-function-docstring
# C0116,
# missing-class-docstring
# C0115,
# protected-access
# W0212,
# pointless-statement
# W0104
# To ignore files or directories (base names, not paths):
# ignore=<file[,file...]>
ignore = setup.py
# Zephyr linter configuration.
min-similarity-lines = 10
[flake8]
# References:
# - https://flake8.pycqa.org/en/latest/user/configuration.html
extend-ignore =
# line-too-long: we rely on black for this
E501
# black formatting would fail with "whitespace before ':'"
# See https://github.com/psf/black/issues/280
E203
[mypy]
# References:
# - https://mypy.readthedocs.io/en/stable/config_file.html
mypy_path = src:tests
exclude = tests/res
python_version = 3.10
packages = dtsh
strict = true
[pylsp-mypy]
# References:
# - https://github.com/python-lsp/pylsp-mypy
enabled = true
dmypy = false
live_mode = true
strict = true
[pep8]
aggressive = 3