Python: Ignore non-project workspace glob matches (#7509)

* Python: Ignore non-project workspace glob matches

* test: collect workspace script tests

* test: remove standalone script test

---------

Co-authored-by: Luis Rodriguez <25299418+luisangelrod@users.noreply.github.com>
Co-authored-by: Luis Rodriguez <luis.rodriguez@bcpos.com>
This commit is contained in:
Luis Rodriguez
2026-08-11 15:14:18 -04:00
committed by GitHub
parent 5e52c6a718
commit 27d82b1567
+3 -1
View File
@@ -44,7 +44,9 @@ def discover_projects(workspace_pyproject_file: Path) -> list[Path]:
for project in projects:
if "*" in project:
globbed = glob.glob(str(project), root_dir=workspace_pyproject_file.parent)
globbed_paths = [Path(p) for p in globbed]
globbed_paths = [
Path(path) for path in globbed if (workspace_pyproject_file.parent / path / "pyproject.toml").is_file()
]
all_projects.extend(globbed_paths)
else:
all_projects.append(Path(project))