MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / iter_source_files

Function iter_source_files

scripts/code-verify.py:1826–1839  ·  view source on GitHub ↗

Yield tracked-suffix files under each target (recursive for dirs). Skips build / _deps / .git / vendored directories so generated and third-party artifacts aren't touched.

(targets: list[Path])

Source from the content-addressed store, hash-verified

1824
1825
1826def iter_source_files(targets: list[Path]) -> Iterable[Path]:
1827 """Yield tracked-suffix files under each target (recursive for dirs).
1828 Skips build / _deps / .git / vendored directories so generated and
1829 third-party artifacts aren't touched."""
1830 for target in targets:
1831 if target.is_file():
1832 if target.suffix in _TRACKED_SUFFIXES:
1833 yield target
1834 continue
1835 for root, dirs, files in os.walk(target):
1836 dirs[:] = [d for d in dirs if d not in _SKIP_DIRS]
1837 for name in files:
1838 if name.endswith(_TRACKED_SUFFIXES):
1839 yield Path(root) / name
1840
1841
1842# ---------------------------------------------------------------------------

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected