def get_dependants_packages(
    changed_packages: set[Path], all_packages: list[Path]
) -> set[Path]:
    """Get packages containing the files in the changeset."""
    changed_packages_names: set[str] = set()
    for pkg_path in changed_packages:
        pyproject_data = load_pyproject(pkg_path)
        changed_packages_names.add(pyproject_data["project"]["name"])

    dependants_packages: set[Path] = set()
    for pkg_path in all_packages:
        pyproject_data = load_pyproject(pkg_path)
        for dep_name in get_dep_names(pyproject_data):
            if dep_name in changed_packages_names:
                dependants_packages.add(pkg_path)

    return dependants_packages
Get packages containing the files in the changeset.
llama-dev/llama_dev/utils.py