MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / iter_files

Function iter_files

tools/format_docs_code.py:327–335  ·  view source on GitHub ↗
(directory: str)

Source from the content-addressed store, hash-verified

325
326
327def 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
338def main(

Callers 1

mainFunction · 0.85

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected