-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
75 lines (63 loc) · 2.19 KB
/
Copy pathpyproject.toml
File metadata and controls
75 lines (63 loc) · 2.19 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
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"
[project]
name = "snapclientmpris"
description = "Snapcast MPRIS bridge"
readme = "README.md"
license = {text = "MIT"}
authors = [{name = "Mathieu Réquillart", email = "mathieu.requillart@gmail.com"}]
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: POSIX :: Linux",
]
dependencies = [
"snapcast>=2.3",
"dbus-fast>=2.0",
"zeroconf>=0.28",
]
dynamic = ["version"]
[project.optional-dependencies]
dev = ["pytest", "mypy", "ruff"]
[project.scripts]
snapclientmpris = "snapclientmpris.cli:main"
[project.urls]
Homepage = "https://github.com/b0bbywan/snapclientmpris"
[tool.setuptools.dynamic]
version = {attr = "snapclientmpris.__version__"}
[tool.setuptools.packages.find]
include = ["snapclientmpris*"]
exclude = ["tests*"]
[tool.pytest.ini_options]
# Add the repo root so `pytest -q` (not via `python -m pytest`) can
# still import the snapclientmpris 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.
"snapclientmpris/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, snapcast, zeroconf) 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 = "snapclientmpris.mpris"
ignore_errors = true