-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
48 lines (42 loc) · 2.08 KB
/
Copy pathpyproject.toml
File metadata and controls
48 lines (42 loc) · 2.08 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
[project]
name = "screensaver-splitflap"
version = "0.1.0"
description = "Split-flap board screensaver for Kodi"
requires-python = ">=3.11"
# Zero runtime dependencies, deliberately: Kodi installs this as a plain
# zip with no pip available. Pillow is build-time only (glyph rasterising)
# and pytest is a test tool -- both belong in the dev extra, never here.
dependencies = []
[project.optional-dependencies]
dev = ["pytest==9.1.1", "Pillow==12.3.0", "debugpy==1.8.21", "ruff==0.16.5", "Kodistubs==21.0.0", "mutmut==3.7.0", "pyright==1.1.411"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = [".", "screensaver.splitflap", "script.splitflap.source.recentlyadded"]
[tool.pyright]
# The add-on is imported with the repo root on sys.path (pytest does this via
# pythonpath, Kodi via default.py's sys.path insert), so tell pyright the same.
extraPaths = ["."]
include = ["resources", "tools", "tests"]
# Kodi 21 (Omega) ships 3.11 and it is the floor; pinning it here makes the
# editor enforce the same constraint CI does.
pythonVersion = "3.11"
[tool.ruff]
line-length = 88
target-version = "py311"
# mutmut writes a mutated copy of the tree here; it is scratch, not source.
extend-exclude = ["mutants", "build"]
[tool.ruff.lint]
# E/F are the defaults; I sorts imports, UP modernises syntax left over from
# the 3.8 floor this project started on, RUF and FURB catch idiom drift.
select = ["E", "F", "I", "UP", "RUF", "FURB"]
[tool.ruff.lint.per-file-ignores]
# charset.py names curly quotes, the ellipsis and accented capitals on purpose --
# they are the glyph set. "Ambiguous unicode" is the whole point of the file.
"screensaver.splitflap/resources/lib/charset.py" = ["RUF001", "RUF003"]
# The build tools bootstrap sys.path before importing the add-on's modules --
# the add-on directory has dots in its name and cannot be a package, so the
# path setup genuinely has to precede the imports.
"tools/*.py" = ["E402"]
# Asserts literal Cyrillic/Greek characters to prove charset_for() resolved
# the right script -- the "ambiguous unicode" is the thing under test.
"tests/test_make_glyph_pack.py" = ["RUF001"]