Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
37 lines (34 loc) · 2.06 KB
/
Copy pathpyproject.toml
File metadata and controls
37 lines (34 loc) · 2.06 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
[tool.uv.workspace]
members = ["packages/*"]
# python-prctl (casquette[rpi] → picamera2 → python-prctl) ships sdist only and
# its setup.py requires the libcap dev headers just to report metadata. Declaring
# the metadata here lets uv resolve/lock without building it, so CI (x86, no Pi
# libs) needs no libcap-dev. It is a leaf with no runtime deps.
[[tool.uv.dependency-metadata]]
name = "python-prctl"
version = "1.8.1"
requires-dist = []
# ── Linting ──────────────────────────────────────────────────────────────
# Workspace-wide ruff config: pyflakes F + pycodestyle E4/E7/E9. E501
# line-length is intentionally left off.
[tool.ruff]
# Generated gRPC stubs are not ours to lint.
extend-exclude = ["**/*_pb2.py", "**/*_pb2_grpc.py", "**/*_pb2.pyi"]
[tool.ruff.lint]
# Selected EXPLICITLY, not inherited from ruff's default. This used to be
# `ignore`-only, relying on ruff defaulting to E4/E7/E9/F — until ruff 0.16
# widened that default and the gate went from clean to 547 errors across the
# repo on a routine tool update. None of the 547 were E* or F* (i.e. no
# correctness findings): 189 blind-except, 85 import-order, 70 B008, 51
# subprocess-without-check, 30 try-except-pass, ~30 more families. Adopting
# them means a repo-wide reformat plus suppressions for zero bugs found, so
# the gate stays narrow — and now says so, independent of tool version.
# CI pins the ruff version too (.github/workflows/ci.yml); both are needed:
# this stops rule-set drift, the pin stops behaviour drift within these rules.
select = ["E4", "E7", "E9", "F"]
# Deferred (lean gate — tighten later): E402 imports-not-at-top and F841
# unused-locals are common-and-often-intentional in scripts/examples; the
# rest are pure style. Keeping them off lets the gate start green with no
# churn in unrelated files. Correctness rules (F401 unused-import, F811
# redefinition, F821 undefined-name, F-string, E711/E712) stay ON.
ignore = ["E402", "E701", "E702", "E731", "E741", "F841"]