feat: add task key sub_tag
This commit is contained in:
@@ -6,7 +6,7 @@ from typing import Iterable
|
||||
|
||||
from .common.command import CommandError
|
||||
from .common.ignore import create_ignore
|
||||
from .entry.entry import Entry
|
||||
from .entry.entry import Entry, PartialTaskKey
|
||||
from .entry.resolver import EntryResolver
|
||||
from .preset.detector import PresetEntryDetector
|
||||
|
||||
@@ -36,11 +36,11 @@ class ProjectManager:
|
||||
def _iter_entries(self) -> Iterable[Entry]:
|
||||
return self._resolver.resolve(self._basepaht)
|
||||
|
||||
def run_task(self, task_name: str, tag: str | None = None) -> dict[str, int]:
|
||||
def run_task(self, key: PartialTaskKey) -> dict[str, int]:
|
||||
counter = Counter()
|
||||
for entry in self._iter_entries():
|
||||
try:
|
||||
if entry.run_task(task_name, tag):
|
||||
if entry.run_task(key):
|
||||
counter[ResultType.SUCCESS] += 1
|
||||
except CommandError as error:
|
||||
self._logger.error("%s\n%s", entry, error.output)
|
||||
|
||||
Reference in New Issue
Block a user