feat: add version task
This commit is contained in:
@@ -14,7 +14,9 @@ class EntryResolver:
|
||||
self._ignore = ignore
|
||||
self._max_depth = max_depth
|
||||
|
||||
def _resolve(self, rootpath: Path, 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
|
||||
@@ -30,4 +32,6 @@ class EntryResolver:
|
||||
yield from self._resolve(rootpath, path, depth + 1)
|
||||
|
||||
def resolve(self, basepath: Path) -> Iterable[Entry]:
|
||||
return self._resolve(basepath, basepath)
|
||||
result = list(self._resolve(basepath, basepath))
|
||||
result.reverse()
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user