Give user a sense of the severity, add basic tests
All checks were successful
Mypy / mypy (push) Successful in 1m11s
Pytest / pytest (3.13) (push) Successful in 1m13s
Pytest / pytest (3.12) (push) Successful in 1m21s
Pytest / pytest (3.14) (push) Successful in 1m14s
Ruff / ruff (push) Successful in 1m1s

This commit is contained in:
Justus Kuhlmann 2026-05-06 19:06:50 +02:00
commit 3640f163fc
Signed by: jkuhl
GPG key ID: 00ED992DD79B85A6
2 changed files with 59 additions and 1 deletions

View file

@ -60,7 +60,10 @@ def are_keys_unique(db: Path, table: str, col: str) -> bool:
c.execute(f"SELECT COUNT( DISTINCT CAST({col} AS nvarchar(4000))), COUNT({col}) FROM {table};")
results = c.fetchall()[0]
conn.close()
return bool(results[0] == results[1])
res = bool(results[0] == results[1])
if not res:
print("Unique:", results[0], "All:", results[1])
return res
def _list_projects(path: Path) -> list[tuple[str, str]]: