(builddir: Path)
return parsed_data
Converts a List of name-to-dict to a dict of name-to-dicts (since names are not unique)
Converts a List of name-to-dict to a dict of name-to-dicts (since names are not unique)
Converts a List of name - to - dict to a dict of name - to - dicts ( since names are not unique )
def parse_introspect_data(builddir: Path) -> T.Dict[str, T.List[dict]]:
    """
    Converts a List of name-to-dict to a dict of name-to-dicts (since names are not unique)
    """
    path_to_intro = builddir / 'meson-info' / 'intro-targets.json'
    if not path_to_intro.exists():
        raise MesonException(f'`{path_to_intro.name}` is missing! Directory is not configured yet?')
    with path_to_intro.open(encoding='utf-8') as f:
        schema = json.load(f)

    parsed_data = defaultdict(list) # type: T.Dict[str, T.List[dict]]
    for target in schema:
        parsed_data[target['name']] += [target]
    return parsed_data
def parse_introspect_data ( builddir : Path ) -> T . Dict [ str , T . List [ dict ] ] : path_to_intro = builddir / 'meson-info' / 'intro-targets.json' if not path_to_intro . exists ( ) : raise MesonException ( f'`{path_to_intro.name}` is missing! Directory is not configured yet?' ) with path_to_intro . open ( encoding = 'utf-8' ) as f : schema = json . load ( f ) parsed_data = defaultdict ( list ) # type: T.Dict[str, T.List[dict]] for target in schema : parsed_data [ target [ 'name' ] ] += [ target ] return parsed_data