From 964e633da257a69550f0dc4001e546d3865d9611 Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Wed, 7 Oct 2026 07:15:31 -0500 Subject: [PATCH] chore(tooling): exclude legacy engine from pyright and narrow gitops target type - Add scripts/appctl_engine.py to pyproject.toml [tool.pyright] exclude list - Add assert target_dir is not None guard in gitops_dispatcher after webhook admission --- pyproject.toml | 3 +++ scripts/gitops_dispatcher.py | 1 + 2 files changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c21255d..2915980 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,5 @@ [tool.pyright] extraPaths = ["scripts"] +exclude = [ + "scripts/appctl_engine.py", +] diff --git a/scripts/gitops_dispatcher.py b/scripts/gitops_dispatcher.py index fc7857f..d1726e1 100755 --- a/scripts/gitops_dispatcher.py +++ b/scripts/gitops_dispatcher.py @@ -722,6 +722,7 @@ def main(): sys.exit(0 if "Branch mismatch" in reason else 1) logger.info(f"✅ Webhook admission passed: {reason}") + assert target_dir is not None, "admitted deployment must have a valid target directory" commit_sha = payload.get("after", "") if not commit_sha and isinstance(payload.get("head_commit"), dict): commit_sha = payload.get("head_commit", {}).get("id", "")