-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
115 lines (106 loc) · 2.85 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
[project]
name = "shvtree"
version = "0.1.1"
description = "Silicon Heaven Tree"
readme = "README.rst"
authors = [
{ name="Elektroline as.s" },
]
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
requires-python = ">=3.11"
dependencies = [
"pyshv~=0.8.0",
"ruamel.yaml",
"asyncinotify",
]
[project.urls]
source = "https://gitlab.com/silicon-heaven/shvtree"
changelog = "https://gitlab.com/silicon-heaven/shvtree/-/blob/master/CHANGELOG.md"
issues = "https://gitlab.com/silicon-heaven/shvtree/-/issues"
[project.optional-dependencies]
test = [
"pytest",
"pytest-asyncio",
"pytest-cov",
]
docs = [
"sphinx",
"sphinx_rtd_theme",
"sphinx-mdinclude",
"sphinx-multiversion",
]
[project.scripts]
shvtree-check = "shvtree.check.__main__:main"
shvtree-size = "shvtree.size.__main__:main"
shvtree-dummy = "shvtree.device.__main__:main"
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
exclude = ["docs", "tests*"]
[tool.setuptools.package-data]
"*" = ["py.typed"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
[tool.coverage.run]
branch = true
omit = ["tests/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if typing.TYPE_CHECKING:"
]
[tool.ruff]
target-version = "py311"
[tool.ruff.lint]
select = [
"F", "E", "W", "I", "N", "D", "UP", "YTT", "ANN", "ASYNC", "ASYNC1", "S", "BLE",
"B", "A", "COM", "PL", "RUF"
]
ignore = [
# Magic methods have defined behavior so what is there to document. __init__
# should be documented in class docstring.
"D105", "D107",
# These have conflicting rules.
"D203", "D213",
# Ignore too long lines (format tackles that)
"E501",
# It is nice that assert should not be used for input checking but it can be
# also used for internal consistency checking.
"S101", "B011",
# subprocess can be insecurely used but not is insecure by design
"S404", "S603", "S607",
# Catching Exception is valid and safe in some cases and thus should be allowed
"BLE001",
# Conflict with formatter
"COM812",
# Remove too-many limit for more complex code.
"PLR0904", "PLR0911", "PLR0912", "PLR0913", "PLR0917", "PLR2004", "PLR1702",
# This seems like a wrong rule
"PLW1641",
]
preview = true
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"D100", "D101", "D102", "D103", "D104", "S101", "S106", "ANN001", "ANN002",
"ANN003", "ANN201", "ANN202", "ANN204", "ANN205", "PLR6301",
]
"docs/conf.py" = ["D100", "D103", "A001", "ANN201", "ANN001"]
[tool.ruff.format]
docstring-code-format = true
preview = true
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
disallow_untyped_defs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = "tests.*"
allow_untyped_defs = true