INNER CODE UNIT · Python

abs_target

mongodb/mongo-cxx-driver · etc/format.py:182

        abs_target = parent_dir / target
        if abs_target.is_file():
            # This should be a relative include:
            newl = f'{mat["directive"]}"./{target}"{mat["tail"]}'
        else:
            newl = f'{mat["directive"]}<{target}>{mat["tail"]}'
        print(f' - {fpath}: update #include directive: {mat[0]!r} → {newl!r}', file=sys.stderr)
        return newl

    return f


def _fixup_includes(fpath: Path, *, mode: RunMode) -> bool:
    """
    Apply #include-fixup to the content of the given source file.
    """
    # Split into lines
    old_lines = fpath.read_text().split('\n')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…