import typing
import pathlib
import itertools


def find_pyfiles() -> typing.Iterator[pathlib.Path]:
    """Return an iterator of the files to format."""
    return itertools.chain(
        pathlib.Path("../gdbmongo").rglob("*.py"),
        pathlib.Path("../gdbmongo").rglob("*.pyi"),
        pathlib.Path("../stubs").rglob("*.pyi"),
        pathlib.Path("../tests").rglob("*.py"))