-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpyproject.toml
132 lines (114 loc) · 3.46 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
[project]
name = "music_assistant_models"
authors = [
{name = "The Music Assistant Authors", email = "music_assistant@users.noreply.github.com"},
]
classifiers = [
"Environment :: Console",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = ["orjson>=3.9", "mashumaro>=3.14"]
description = "Music Assistant Base Models"
license = {text = "Apache-2.0"}
readme = "README.md"
requires-python = ">=3.11"
# The version is set by GH action on release
version = "0.0.0"
[project.optional-dependencies]
test = [
"codespell==2.4.1",
"isort==6.0.1",
"mypy==1.15.0",
"pre-commit==4.1.0",
"pre-commit-hooks==5.0.0",
"pytest==8.3.5",
"pytest-cov==6.0.0",
"tomli==2.2.1",
"ruff==0.9.10",
]
[tool.codespell]
skip = "*.js"
[tool.setuptools]
include-package-data = true
packages = ["music_assistant_models", "music_assistant_models.media_items"]
platforms = ["any"]
zip-safe = false
[tool.setuptools.package-data]
music_assistant_models = ["py.typed"]
[tool.ruff]
fix = true
show-fixes = true
line-length = 100
target-version = "py311"
[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "pep257"
[tool.ruff.lint.pylint]
max-args = 10
max-branches = 25
max-returns = 15
max-statements = 50
[tool.mypy]
check_untyped_defs = true
disable_error_code = ["annotation-unchecked", "import-not-found", "import-untyped"]
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
enable_error_code = ["ignore-without-code", "redundant-self", "truthy-iterable"]
extra_checks = false
follow_imports = "silent"
local_partial_types = true
no_implicit_optional = true
packages = ["music_assistant_models"]
show_error_codes = true
strict_equality = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.ruff.format]
# Force Linux/MacOS line endings
line-ending = "lf"
[tool.pytest.ini_options]
addopts = "--cov music_assistant_models"
asyncio_mode = "auto"
[tool.ruff.lint]
ignore = [
"ANN002", # Just annoying, not really useful
"ANN003", # Just annoying, not really useful
"ANN401", # Opinioated warning on disallowing dynamically typed expressions
"D203", # Conflicts with other rules
"D213", # Conflicts with other rules
"ISC001", # Conflicts with formatter
"D417", # False positives in some occasions
"EM101", # Just annoying, not really useful
"EM102", # Just annoying, not really useful
"FIX002", # Just annoying, not really useful
"PLR2004", # Just annoying, not really useful
"PD011", # Just annoying, not really useful
"S101", # assert is often used to satisfy type checking
"TCH001", # Just annoying, not really useful
"TCH003", # Just annoying, not really useful
"TD002", # Just annoying, not really useful
"TD003", # Just annoying, not really useful
"TD004", # Just annoying, not really useful
"TRY003", # Just annoying, not really useful
"TRY400", # Just annoying, not really useful
"COM812", # Conflicts with the Ruff formatter
"N818", # Just annoying, not really useful
"FBT001", # Just annoying, not really useful
"FBT002", # Just annoying, not really useful
]
select = ["ALL"]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
[tool.ruff.lint.isort]
known-first-party = ["music_assistant_models"]
[tool.ruff.lint.mccabe]
max-complexity = 25