MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / ruff_json

Function ruff_json

tools/trim_lines.py:39–47  ·  view source on GitHub ↗
(paths: list[str])

Source from the content-addressed store, hash-verified

37
38
39def ruff_json(paths: list[str]) -> list[dict]:
40 proc = run(["ruff", "check", *paths, "--output-format=json", "--exit-zero"], check=False)
41 try:
42 data = json.loads(proc.stdout or "[]")
43 except json.JSONDecodeError as e:
44 raise SystemExit(f"Could not parse Ruff JSON: {e}") from e
45 if not isinstance(data, list):
46 raise SystemExit("Unexpected Ruff JSON output")
47 return data
48
49
50def unique_e501_files(paths: list[str]) -> list[str]:

Callers 1

unique_e501_filesFunction · 0.85

Calls 1

runFunction · 0.70

Tested by

no test coverage detected