feat: add task key sub_tag
This commit is contained in:
@@ -14,11 +14,11 @@ class EntryResolver:
|
||||
self._ignore = ignore
|
||||
self._max_depth = max_depth
|
||||
|
||||
def _resolve(self, basepath: Path, depth: int = 0) -> Iterable[Entry]:
|
||||
def _resolve(self, rootpath: Path, basepath: Path, depth: int = 0) -> Iterable[Entry]:
|
||||
if basepath.is_dir():
|
||||
if basepath.name.startswith(".") or self._ignore.match_file(basepath):
|
||||
return
|
||||
entry = self._detector.detect_entry(basepath)
|
||||
entry = self._detector.detect_entry(basepath, rootpath)
|
||||
if entry:
|
||||
yield entry
|
||||
if (
|
||||
@@ -27,7 +27,7 @@ class EntryResolver:
|
||||
and basepath.is_dir()
|
||||
):
|
||||
for path in basepath.iterdir():
|
||||
yield from self._resolve(path, depth + 1)
|
||||
yield from self._resolve(rootpath, path, depth + 1)
|
||||
|
||||
def resolve(self, basepath: Path) -> Iterable[Entry]:
|
||||
return self._resolve(basepath)
|
||||
return self._resolve(basepath, basepath)
|
||||
|
||||
Reference in New Issue
Block a user