fix(ci): lint ruff 0.16.3 - imports tries, check explicite, removeprefix
CI / lint (push) Successful in 28s
CI / security (push) Successful in 18s
CI / test (push) Successful in 36s
CI / build (push) Failing after 12s
CI / e2e (push) Skipped
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s

- backend/main.py : split import csv / import io as csv_io (I001)

- backend/version.py : check=False explicite sur subprocess.run (PLW1510)

- backend/version.py : tag.removeprefix() au lieu du slice conditionnel (FURB188)

- verifie localement avec ruff 0.16.3 : All checks passed!
This commit is contained in:
2026-08-24 16:28:28 -04:00
parent 331c614330
commit 62e191abfc
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -2484,7 +2484,8 @@ async def api_file(vault_name: str, path: str = Query(..., description="Relative
# === CSV: render as HTML table ===
if ext == ".csv":
import csv, io as csv_io
import csv
import io as csv_io
reader = csv.reader(csv_io.StringIO(raw))
rows = list(reader)
if not rows:
+2 -2
View File
@@ -26,13 +26,13 @@ def get_version() -> str:
capture_output=True,
text=True,
timeout=5,
check=False,
)
if result.returncode == 0:
tag = result.stdout.strip()
# git describe returns v1.7.0 or v1.7.0-3-gabc1234
# Remove leading 'v' if present
if tag.startswith("v"):
tag = tag[1:]
tag = tag.removeprefix("v")
return tag
except (FileNotFoundError, subprocess.TimeoutExpired, OSError):
pass