(directory: str)
| 325 | |
| 326 | |
| 327 | def iter_files(directory: str) -> Iterator[Path]: |
| 328 | dir_path = home / directory |
| 329 | |
| 330 | for file in chain(dir_path.glob("./**/*.rst"), dir_path.glob("./**/*.py")): |
| 331 | local = file.relative_to(home).as_posix() |
| 332 | if any(pattern.match(local) for pattern in include_paths) and not any( |
| 333 | pattern.match(local) for pattern in ignore_paths |
| 334 | ): |
| 335 | yield file |
| 336 | |
| 337 | |
| 338 | def main( |