MCPcopy Create free account
hub / github.com/crisxuan/bestJavaer / read_path

Function read_path

scripts/check_article_quality.py:386–389  ·  view source on GitHub ↗
(path: Path, *, staged: bool)

Source from the content-addressed store, hash-verified

384
385
386def read_path(path: Path, *, staged: bool) -> str:
387 if staged:
388 return run_git(["show", f":{path.as_posix()}"])
389 return path.read_text(encoding="utf-8")
390
391
392def collect_paths(args: argparse.Namespace) -> tuple[list[Path], bool]:

Callers 1

check_filesFunction · 0.85

Calls 1

run_gitFunction · 0.85

Tested by

no test coverage detected