-
Notifications
You must be signed in to change notification settings - Fork 22
/
pyproject.toml
128 lines (109 loc) · 3.36 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
[build-system]
requires = ["setuptools >= 66", "setuptools-scm >= 7.1"]
build-backend = "setuptools.build_meta"
[project]
name = "mopidy-mpd"
description = "Mopidy extension for controlling Mopidy from MPD clients"
readme = "README.rst"
requires-python = ">= 3.11"
license = { text = "Apache-2.0" }
authors = [{ name = "Stein Magnus Jodal", email = "stein.magnus@jodal.no" }]
classifiers = [
"Environment :: No Input/Output (Daemon)",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Sound/Audio :: Players",
]
dynamic = ["version"]
dependencies = [
"mopidy >= 4.0.0a1",
"pygobject >= 3.42",
"pykka >= 4.0",
"setuptools >= 66",
]
[project.optional-dependencies]
lint = ["ruff >= 0.8.2"]
test = ["pytest >= 7.2", "pytest-cov >= 4.0"]
typing = ["pygobject-stubs >= 2.12.0", "pyright >= 1.1.380"]
dev = ["mopidy-mpd[lint,test,typing]", "tox >= 4.21"]
[project.urls]
Source = "https://github.com/mopidy/mopidy-mpd"
Issues = "https://github.com/mopidy/mopidy-mpd/issues"
[project.entry-points."mopidy.ext"]
mpd = "mopidy_mpd:Extension"
[tool.pyright]
pythonVersion = "3.11"
# Use venv from parent directory, to share it with any extensions:
venvPath = "../"
venv = ".venv"
typeCheckingMode = "standard"
# Already covered by flake8-self:
reportPrivateImportUsage = false
[tool.ruff]
target-version = "py311"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN401", # any-type
"D", # pydocstyle
"EM101", # raw-string-in-exception # TODO
"EM102", # f-string-in-exception # TODO
"FIX001", # line-contains-fixme
"FIX002", # line-contains-todo
"G004", # logging-f-string
"S101", # assert # TODO
"TD002", # missing-todo-author
"TD003", # missing-todo-link
"TD004", # missing-todo-colon # TODO
"TD005", # missing-todo-description # TODO
"TRY003", # raise-vanilla-args
#
# These rules interfere with `ruff format`
"COM812", # missing-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
]
[tool.ruff.lint.per-file-ignores]
"src/mopidy_mpd/protocol/*" = [
"ARG001", # unused-function-argument
]
"tests/*" = [
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"D", # pydocstyle
"FBT", # flake8-boolean-trap
"PLR0913", # too-many-arguments
"PLR2004", # magic-value-comparison
"PT027", # pytest-unittest-raises-assertion
"S101", # assert
"SLF001", # private-member-access
"TRY002", # raise-vanilla-class
]
[tool.setuptools_scm]
[tool.tox]
requires = ["tox >= 4.21"]
env_list = ["3.11", "3.12", "3.13", "pyright", "ruff-lint", "ruff-format"]
[tool.tox.env_run_base]
deps = [".[test]"]
commands = [
[
"pytest",
"--basetemp={envtmpdir}",
"--cov=mopidy_mpd",
"--cov-report=term-missing",
"{posargs}",
],
]
[tool.tox.env.pyright]
deps = [".[typing]"]
commands = [["pyright", "{posargs:src}"]]
[tool.tox.env.ruff-lint]
deps = [".[lint]"]
commands = [["ruff", "check", "{posargs:.}"]]
[tool.tox.env.ruff-format]
deps = [".[lint]"]
commands = [["ruff", "format", "--check", "{posargs:.}"]]