-
Notifications
You must be signed in to change notification settings - Fork 25
/
pyproject.toml
229 lines (205 loc) · 5.7 KB
/
pyproject.toml
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
[tool.poetry]
name = "micropy-cli"
version = "4.2.2"
description = "Micropython Project Management Tool with VSCode support, Linting, Intellisense, Dependency Management, and more!"
authors = ["Braden Mars <[email protected]>"]
license = "MIT"
packages = [{ include = "micropy" }]
include = [
{ path = "tests", format = "sdist" },
"README.md",
"CHANGELOG.md",
"LICENSE",
"micropy/lib/stubber/src/*",
"micropy/lib/stubber/board/*",
"micropy/lib/stubber/process.py",
"micropy/lib/stubber/minified/*"
]
exclude = ["micropy/lib/stubber/*"]
readme = "README.md"
homepage = "https://github.com/BradenM/micropy-cli"
repository = "https://github.com/BradenM/micropy-cli"
documentation = "https://micropy-cli.readthedocs.io"
keywords = ["micropython", "stubs", "linting", "vscode", "intellisense"]
classifiers = [
"Operating System :: OS Independent",
"Topic :: Software Development :: Code Generators",
"Topic :: Software Development :: Embedded Systems",
"Topic :: Software Development :: Build Tools",
"Programming Language :: Python :: Implementation :: MicroPython",
"Programming Language :: Python :: Implementation :: CPython",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
]
[tool.poetry.scripts]
micropy = 'micropy.app:app'
[tool.poetry.dependencies]
python = ">=3.9,<3.12"
boltons = "==23.1.1"
cachier = "2.3.0"
Jinja2 = "3.1.4"
questionary = "1.10.0"
requests = "2.32.2"
requirements-parser = "0.9.0"
tqdm = "4.66.4"
click = "8.1.7"
colorama = { version = "==0.4.6", platform = "win32" }
jsonschema = "=3.2.0"
dpath = "==1.5.0"
GitPython = "==3.1.43"
packaging = "==21.3"
python-minifier = "==2.9.0"
mypy = "^1"
## rshell is broken on windows (with python >=3.10) due to pyreadline dependency.
rshell = [
{ version = "^0.0.31", platform = "win32", python = "<3.10" },
{ version = "^0.0.31", platform = "!=win32" },
]
MarkupSafe = "==2.1.5"
upydevice = "0.3.8"
attrs = "==23.2.0"
typing-extensions = "4.12.2"
pydantic = "1.10.16"
distlib = "0.3.8"
importlib-metadata = { version = "==5.2.0", python = '<3.10' }
micropython-stubber = "==1.23.2"
libcst = ">=1.1.0,<2.0.0"
typer = {version = "0.12.3", extras = ["all"]}
[tool.poetry.group.dev.dependencies]
bump2version = "^0.5.11"
pre-commit = "^3.0.2"
mypy = { version = "^1.0", extras = ["dmypy"] }
types-requests = "^2.27.14"
pylint = "^2.7"
better-exceptions = "^0.3.3"
pdbpp = {version = "^0.10.3", platform = "!=win32" }
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
pyupgrade = "^3.3.1"
isort = "^5.12.0"
black = ">=22.10,<23.0"
ruff = "^0.5.0"
[tool.poetry.group.test]
optional = true
[tool.poetry.group.test.dependencies]
pytest = "^7.1.1"
pytest-cov = "^4.0"
pytest-datadir = "^1.3"
pytest-mock = "^3.5"
pytest-runner = "^6.0"
pytest-testmon = "^1.3"
pytest-watch = "^4.2"
pytest-xdist = "^3.0"
pytest-forked = "^1.3"
pytest-randomly = "^3.7.0"
pytest-sugar = "^0.9.4"
requests-mock = "^1.9"
flaky = "^3.7.0"
coveralls = "^3.0"
codacy-coverage = "^1.3"
mock = "^5.0.1"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx-click = "^4.3.0"
sphinx-autodoc-typehints = "^1.19.2"
recommonmark = "^0.7.0"
Sphinx = "^5.2.1"
sphinx-rtd-theme = "^1.0.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 100
skip-string-normalization = false
target-version = ['py38']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| build
| dist
| micropy/lib
)/
| foo.py # also separately exclude a file named foo.py in
# the root of the project
)
'''
[tool.isort]
profile = "black"
src_paths = ["src"]
line_length = 100
honor_noqa = true
[tool.ruff]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
# "I", # isort
# "D", # pydocstyle
"UP", # pyupgrade
"C", # flake8-comprehensions
"B", # flake8-bugbear
# "PT", # flake8-pytest-style
"RUF" # ruff specific rules
]
ignore = [
"E501", # line too long - let black handle.
"C901", # too complex
"C408", # rewrite as literal; makes comprehensions harder sometimes imo
"B008", # no function call as arg default; typer uses this pattern.
]
line-length = 100
target-version = 'py38'
src = ['micropy']
extend-exclude = ['micropy/lib', 'tests/test_stubs', 'tests/data', 'micropy/utils/__init__.py', 'micropy/__init__.py']
[tool.ruff.pyupgrade]
keep-runtime-typing = true
[tool.pytest.ini_options]
collect_ignore = ['setup.py', 'micropy/lib/*', 'micropy/lib/**/*']
testpaths = "tests"
addopts = "--maxprocesses=4 -ra -q"
norecursedirs = "micropy/lib"
mock_use_standalone_module = true
[tool.coverage.run]
source = ["micropy"]
omit = ["micropy/project/template/*", "micropy/lib/*", "micropy/lib/**/*"]
[tool.coverage.report]
exclude_lines = [
"if __name__ == .__main__.:",
'class .*\bProtocol\):',
'raise NotImplementedError',
'raise AssertionError',
'def __repr__',
'noqa',
'@(abc\.)?abstractmethod',
'pragma: no cover'
]
[tool.mypy]
plugins = [
"pydantic.mypy"
]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = ["boltons", "upydevice", "upydevice.*", "rshell", "tqdm"]
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true