You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by po...@apache.org on 2026/10/04 23:47:09 UTC
(magpie) 01/01: fix(release-config): initialise skill before parsing it
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch perf/release-config-tool
in repository https://gitbox.apache.org/repos/asf/magpie.git
commit 1f24cef5ef726dfae6c8c71c4489b36bd627c1e6
Author: Jarek Potiuk <po...@apache.org>
AuthorDate: Mon Oct 5 01:45:05 2026 +0200
fix(release-config): initialise skill before parsing it
CodeQL (py/uninitialized-local-variable) could not see that
parser.error() exits, so it read `skill` as possibly unset on the
error path. Initialise it first; behaviour is unchanged.
Generated-by: Claude Opus 5
---
tools/release-config/src/release_config/cli.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/release-config/src/release_config/cli.py b/tools/release-config/src/release_config/cli.py
index 43eb45d4..559c2935 100644
--- a/tools/release-config/src/release_config/cli.py
+++ b/tools/release-config/src/release_config/cli.py
@@ -73,6 +73,7 @@ def _parser() -> argparse.ArgumentParser:
def run(argv: list[str] | None = None) -> dict[str, Any]:
parser = _parser()
args = parser.parse_args(argv)
+ skill: str | None = None
try:
skill = normalise_skill(args.skill) if args.skill else None
except ValueError as exc: