topos.utils.discovery¶
Prune third-party and ignored paths when discovering source files.
- topos.utils.discovery.is_virtualenv_root(dir_path)[source]
True when dir_path looks like a Python virtual environment root.
- topos.utils.discovery.should_skip_dir(dir_path)[source]
Whether to avoid descending into dir_path during discovery.
- topos.utils.discovery.find_git_root(start)[source]
Return the repository root containing
.git, if any.
- topos.utils.discovery.build_path_skip_checker(scan_root)[source]
Compose hard-coded,
.toposignore, and git ignore checks for scan_root.
- topos.utils.discovery.iter_source_files(root, *, suffixes, recursive=True, is_ignored=None)[source]
Yield source files under root, pruning venvs and ignored directories.
- topos.utils.discovery.collect_source_files(paths, *, suffixes, recursive=True)[source]
Collect source files from explicit paths (files or directories).