-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
The function open_all as part of target.py does not support passing --recursive or recursive=True to open_children and this is likely desired when calling target-query with -~~children perhaps optionally with ~~ ~~recursive or should ~~-children always be recursive?.
def open_all(
cls, paths: str | Path | list[str \| Path], include_children: bool = False, \*, apply: bool = True
) -> Iterator[Self]:
"""Yield all targets from one or more paths or directories.
If the path is a directory, iterate files one directory deep.
Args:
paths: A list of paths to load ``Targets`` from.
If the path is a ``os.PathLike`` object, it will be used as-is.
If the path is a string and looks like a URI, it will be parsed as such.
If the path is a string and does not look like a URI, it will be treated as a local path.
include_children: Whether to recursively open child targets.
Raises:
TargetError: Raised when not a single ``Target`` can be loaded.
"""
def _open_all(spec: str | Path, include_children: bool = False, \*, apply: bool = True) -> Iterator[Target]:Will create a PR that causes the following behavior:
--list-children and --children go one (1) layer deep
--list-children and -~~children with ~~-recursive will go as deep as digitally possible.
I will modify argeparse to reflect this as good as possible.
Metadata
Metadata
Assignees
Labels
No labels