INNER CODE UNIT · Python

reference

ExplosionEngine/Explosion · ThirdParty/ConanRecipes/build_recipes.py:77

    def reference(self) -> str:
        return f"{self.name}/{self.version}"


def list_versions(data: dict) -> list[str]:
    sources = data.get("sources")
    if isinstance(sources, dict) and sources:
        return [str(v) for v in sources]
    versions = data.get("versions")
    if isinstance(versions, list) and versions:
        return [str(v) for v in versions]
    return []


def discover_recipes(root: Path) -> list[Recipe]:
    return [
        Recipe(child)
        for child in sorted(p for p in root.iterdir() if p.is_dir())

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…