feat: update default presets
This commit is contained in:
@@ -14,9 +14,14 @@ class PresetEntryDetector(EntryDetector):
|
||||
def __init__(self, preset_loader_config: PresetLoaderConfig | None = None):
|
||||
self._preset_loader_config = preset_loader_config
|
||||
|
||||
# pylint:disable=too-many-locals
|
||||
def detect_entry(self, basepath: Path, rootpath: Path) -> Entry:
|
||||
template = PathTemplate(basepath)
|
||||
preset = PresetLoader(basepath, self._preset_loader_config).load()
|
||||
if preset.modules:
|
||||
modules = [Path(item).resolve() for item in preset.modules]
|
||||
if basepath not in modules:
|
||||
return ENTRY_SKIP
|
||||
if preset.skip:
|
||||
return ENTRY_SKIP
|
||||
tasks = []
|
||||
@@ -25,7 +30,10 @@ class PresetEntryDetector(EntryDetector):
|
||||
preset.presets.items(), key=lambda item: item[1].priority, reverse=True
|
||||
)
|
||||
for tag, preset in presets:
|
||||
preset_variables: Variables = {**global_variables, "entry_path": basepath}
|
||||
preset_variables: Variables = {
|
||||
**global_variables,
|
||||
"entry_path": str(basepath),
|
||||
}
|
||||
if preset.variables:
|
||||
if tag == "*":
|
||||
template.update_variables(preset.variables, global_variables)
|
||||
|
||||
Reference in New Issue
Block a user