feat: add version task

This commit is contained in:
2026-09-14 22:53:35 +03:00
parent 5401f04485
commit 2df0dc762f
9 changed files with 56 additions and 5 deletions
+6 -2
View File
@@ -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