-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
114 lines (102 loc) · 3.45 KB
/
pyproject.toml
File metadata and controls
114 lines (102 loc) · 3.45 KB
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
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"
[project]
name = "micropython-steami-lib"
version = "0.1.0"
description = "MicroPython driver library for the STeaMi board."
license = {text = "GPL-3.0-or-later"}
requires-python = ">=3.7"
[project.optional-dependencies]
dev = ["ruff==0.11.6"]
test = ["pytest==7.4.0", "pyyaml==6.0.2", "mpremote>=1.0"]
[tool.setuptools]
# No Python packages to install — this project contains MicroPython drivers
packages = []
[project.urls]
Homepage = "https://www.steami.cc/"
Repository = "https://github.com/steamicc/micropython-steami-lib"
Documentation = "https://wiki.steami.cc/"
Issues = "https://github.com/steamicc/micropython-steami-lib/issues"
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"mock: tests using FakeI2C (no hardware needed)",
"hardware: tests requiring a real board (use --port)",
"manual: tests requiring human validation",
"board: board qualification tests (no driver, hardware only)",
]
[tool.ruff]
line-length = 99
target-version = "py37"
[tool.ruff.lint]
select = [
"ASYNC", # flake8-async
"C4", # flake8-comprehensions
"C90", # McCabe cyclomatic complexity
"DTZ", # flake8-datetimez
"E", # pycodestyle
"EXE", # flake8-executable
"F", # Pyflakes
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"N802", # pep8-naming: function name should be lowercase
"N803", # pep8-naming: argument name should be lowercase
"N806", # pep8-naming: variable in function should be lowercase
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # Pylint
"PYI", # flake8-pyi
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"T10", # flake8-debugger
"T20", # flake8-print: no print() in production code
"TCH", # flake8-type-checking
"W", # pycodestyle
"YTT", # flake8-2020
]
ignore = [
"E501", # line length, recommended to disable
"E722", # bare except
"E741", # 'l' is currently widely used
"F401", # unused import (wildcard re-exports)
"F403", # wildcard import
"F405", # name from wildcard import
"ISC001", # conflicts with formatter
"ISC003", # micropython does not support implicit concatenation of f-strings
"PIE810", # micropython does not support passing tuples to .startswith or .endswith
"PLC1901", # compare to empty string
"PLR1704", # sometimes desirable to redefine an argument to save code size
"PLR1714", # consider merging multiple comparisons
"PLR5501", # use elif instead of else+if
"PLW0602", # global variable not assigned
"PLW0603", # global statement
"PLW2901", # overwriting loop variable
"RUF012", # mutable class variable
"RUF100", # unused noqa
"SIM101", # merge isinstance calls
"W191", # tab-indent, redundant when using formatter
]
[tool.ruff.lint.isort]
known-third-party = ["micropython"]
[tool.ruff.lint.mccabe]
max-complexity = 61
[tool.ruff.lint.pylint]
allow-magic-value-types = ["bytes", "int", "str"]
max-args = 14
max-branches = 58
max-returns = 13
max-statements = 166
[tool.ruff.lint.per-file-ignores]
# manifest.py files are evaluated with some global names pre-defined
"**/manifest.py" = ["F821"]
"**/examples/*.py" = ["T20", "N806"]
"tests/**/*.py" = ["T20"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"