def _get_notebook_paths()

in utils/check_nb_kernel.py [0:0]


def _get_notebook_paths(nb_path: str):
    """Generate notebook paths."""
    if "*" in nb_path:
        for glob_path in Path().glob(nb_path):
            if glob_path.is_file() and glob_path.suffix.casefold() == ".ipynb":
                yield glob_path
    elif Path(nb_path).is_dir():
        yield from Path(nb_path).glob("*.ipynb")
    elif Path(nb_path).is_file():
        yield Path(nb_path)