mirror of
https://github.com/hacksider/Deep-Live-Cam.git
synced 2026-06-06 04:23:54 +02:00
cfa8123b67
Introduces pyproject.toml + .github/workflows/ruff.yml that gate E701, E711, E712, F401, F541 on every PR and push to main. Fixes the existing findings for those rules: - Remove unused imports (sklearn.silhouette_score, numpy in several files, typing.Optional, get_one_face, gpu_cvt_color, sys, insightface.face_align) - Annotate the intentional tkinter_fix side-effect import with `# noqa: F401` - Split multi-statement `if x: y` one-liners onto separate lines - Replace `state == True` / `state == False` with truthiness checks - Drop `f` prefix from f-strings with no placeholders F841 (unused-variable), E402 (module-level-import-not-at-top), and F821 (undefined-name) are left out of the gate for now — they surface real findings (including a latent NameError in face_swapper.py) that require human review to fix safely. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 lines
370 B
TOML
10 lines
370 B
TOML
[tool.ruff]
|
|
target-version = "py310"
|
|
|
|
[tool.ruff.lint]
|
|
# Deterministic, low-risk rules enforced in CI. Other rules (F841, E402, F821)
|
|
# surface real findings but require human judgement to fix safely, so they are
|
|
# left out of the gate for now. Intentional side-effect imports should be
|
|
# annotated with `# noqa: F401`.
|
|
select = ["E701", "E711", "E712", "F401", "F541"]
|