INNER CODE UNIT · Python

all_our_sources

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

def all_our_sources() -> set[Path]:
    """
    Obtain a set of all first-party source files in the repository.
    """
    # Every file in our main source dirs:
    everything = set(
        itertools.chain.from_iterable(
            REPO_DIR.joinpath(subdir).glob(p) for p in SOURCE_PATTERNS for subdir in SOURCE_DIRS
        )
    )
    # Every file in our main source dirs that we want to exclude:
    excluded = set(itertools.chain.from_iterable(REPO_DIR.glob(exc) for exc in EXCLUDE_SOURCES))
    # Remove excluded from everything. Return that.
    return everything - excluded


def _include_subst_fn(fpath: Path):
    "Create a regex substitution function that prints a message for the file when a substitution is made"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…