-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
79 lines (67 loc) · 2.38 KB
/
Copy pathpyproject.toml
File metadata and controls
79 lines (67 loc) · 2.38 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
[build-system]
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"
[project]
name = "mpd2mpris"
description = "MPRIS2 D-Bus bridge for MPD"
readme = "README.md"
license = "GPL-3.0-or-later"
license-files = ["COPYING"]
authors = [{name = "Mathieu Réquillart", email = "mathieu.requillart@gmail.com"}]
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: POSIX :: Linux",
]
dependencies = [
# <3.2: mpd_client.fetch_config leans on private attrs.
"python-mpd2>=3.1,<3.2",
"dbus-fast>=2.0",
]
dynamic = ["version"]
[project.optional-dependencies]
dev = ["pytest", "pytest-asyncio", "mypy", "ruff", "build"]
# MusicBrainz cover lookup (cover.py step 6): the recording search and its
# fuzzy artist/title validation go together.
cover = ["musicbrainzngs>=0.7"]
[project.scripts]
mpd2mpris = "mpd2mpris.cli:main"
[project.urls]
Homepage = "https://github.com/b0bbywan/mpd2mpris"
[tool.setuptools.dynamic]
version = {attr = "mpd2mpris.__version__"}
[tool.setuptools.packages.find]
include = ["mpd2mpris*"]
exclude = ["tests*"]
[tool.pytest.ini_options]
# Add the repo root so `pytest -q` (not via `python -m pytest`) can
# still import the mpd2mpris package without an editable install.
pythonpath = ["."]
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
# Pyflakes (F) for real bugs, pycodestyle (E, W) for style, isort (I) for
# imports, bugbear (B) for common pitfalls, pyupgrade (UP) for modern
# Python idioms, and simplify (SIM) for redundant constructs.
select = ["E", "F", "W", "I", "B", "UP", "SIM"]
[tool.ruff.lint.per-file-ignores]
# The dbus-fast service interface declares D-Bus type signatures as Python
# annotations ("s", "b", "a{sv}", ...). Ruff parses these as forward
# references and complains; silence F821/F722 for that file only.
"mpd2mpris/mpris.py" = ["F821", "F722", "UP037"]
[tool.mypy]
python_version = "3.11"
warn_unused_ignores = true
warn_redundant_casts = true
warn_return_any = true
no_implicit_optional = true
disallow_untyped_defs = true
# Third-party libs (dbus_fast, mpd) don't ship type stubs; treat their
# imports as Any rather than failing outright.
ignore_missing_imports = true
[[tool.mypy.overrides]]
# Same dbus-fast signature-as-annotation issue as with ruff: those "s",
# "b", "a{sv}" strings aren't Python types. Skip mpris.py.
module = "mpd2mpris.mpris"
ignore_errors = true