INNER CODE UNIT · Python

matching_files

zhinkgit/embeddedskills · .github/maintenance/repo_checks.py:20

def matching_files(root: Path, pattern: str) -> list[Path]:
    return sorted(
        path
        for path in root.rglob(pattern)
        if path.is_file()
        and not any(
            part in SKIP_DIRECTORIES for part in path.relative_to(root).parts
        )
    )


def parse_frontmatter(path: Path) -> dict[str, str]:
    text = path.read_text(encoding="utf-8")
    match = FRONTMATTER_PATTERN.match(text)
    if not match:
        raise ValueError("missing frontmatter enclosed by ---")

    values: dict[str, str] = {}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…