chore: update

This commit is contained in:
2026-07-04 19:55:09 +08:00
parent 52e20e3f93
commit e76d93187b
2 changed files with 11 additions and 13 deletions
+1 -4
View File
@@ -36,7 +36,4 @@ def main() -> None:
parser.print_help()
return
px.run_yaml(
_CONFIG,
jobs=args.command,
)
px.run_yaml(_CONFIG, jobs=args.command)
+10 -9
View File
@@ -136,15 +136,13 @@ _ENV_VAR_EQUALS_RE = re.compile(r"^env\.(\w+)\s*==\s*['\"]([^'\"]*)['\"]$")
_ENV_VAR_NOT_EQUALS_RE = re.compile(r"^env\.(\w+)\s*!=\s*['\"]([^'\"]*)['\"]$")
# 支持的 job 字段名(连字符形式)
_JOB_FIELDS_HYPHEN = frozenset(
{
"continue-on-error",
"skip-if-missing",
"allow-upstream-skip",
"concurrency-key",
"runs-on",
}
)
_JOB_FIELDS_HYPHEN = frozenset({
"continue-on-error",
"skip-if-missing",
"allow-upstream-skip",
"concurrency-key",
"runs-on",
})
class YamlLoadError(px.PyFlowXError):
@@ -257,6 +255,9 @@ def run_yaml(
``jobs`` 指定了不存在的 job 名
"""
graph = load_yaml(path, variables=variables)
if jobs is None:
raise ValueError("jobs 不能为空")
if jobs is not None:
job_names = [jobs] if isinstance(jobs, str) else list(jobs)
all_names = _collect_with_deps(graph, job_names)