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

Function check_images

scripts/check_article_quality.py:369–383  ·  view source on GitHub ↗
(
    article_path: Path,
    text: str,
    *,
    staged: bool,
    args: argparse.Namespace,
    root: Path,
)

Source from the content-addressed store, hash-verified

367
368
369def check_images(
370 article_path: Path,
371 text: str,
372 *,
373 staged: bool,
374 args: argparse.Namespace,
375 root: Path,
376) -> tuple[int, tuple[ImageIssue, ...]]:
377 refs = find_image_refs(text)
378 issues = [
379 ImageIssue(line=ref.line, target=ref.target, issue=issue)
380 for ref in refs
381 if (issue := image_issue(article_path, ref, staged=staged, args=args, root=root))
382 ]
383 return len(refs), tuple(issues)
384
385
386def read_path(path: Path, *, staged: bool) -> str:

Callers 1

check_filesFunction · 0.85

Calls 3

find_image_refsFunction · 0.85
ImageIssueClass · 0.85
image_issueFunction · 0.85

Tested by

no test coverage detected