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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user