This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-3-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-3-test by this push:
new 5931029a3e8 Fix Breeze type errors that fail static checks on every PR
(#70900)
5931029a3e8 is described below
commit 5931029a3e8bfd93f4310fe8851b8fada9028194
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Aug 1 14:21:54 2026 +0200
Fix Breeze type errors that fail static checks on every PR (#70900)
Static checks fail branch-wide because GitPython's `ls_remote` and Click's
`choices` are typed more precisely than the code assumed. Both spellings are
already what main carries, so bringing them over keeps the branches aligned.
---
dev/breeze/src/airflow_breeze/utils/custom_param_types.py | 4 ++--
dev/breeze/src/airflow_breeze/utils/github.py | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dev/breeze/src/airflow_breeze/utils/custom_param_types.py
b/dev/breeze/src/airflow_breeze/utils/custom_param_types.py
index 365e2e4e794..93f7ccd660c 100644
--- a/dev/breeze/src/airflow_breeze/utils/custom_param_types.py
+++ b/dev/breeze/src/airflow_breeze/utils/custom_param_types.py
@@ -192,9 +192,9 @@ class CacheableChoice(click.Choice):
if not current_value:
current_choices = self.choices
else:
- current_choices = [
+ current_choices = tuple(
f">{choice}<" if choice == current_value else choice for
choice in self.choices
- ]
+ )
choices_str = " | ".join(current_choices)
# Use curly braces to indicate a required argument.
if param.required and param.param_type_name == "argument":
diff --git a/dev/breeze/src/airflow_breeze/utils/github.py
b/dev/breeze/src/airflow_breeze/utils/github.py
index 29f73c231a7..a51f40122c8 100644
--- a/dev/breeze/src/airflow_breeze/utils/github.py
+++ b/dev/breeze/src/airflow_breeze/utils/github.py
@@ -25,7 +25,7 @@ import zipfile
from collections.abc import Mapping, Sequence
from datetime import datetime, timezone
from pathlib import Path
-from typing import TYPE_CHECKING, Any
+from typing import TYPE_CHECKING, Any, cast
from rich.markup import escape
@@ -237,7 +237,9 @@ def get_active_airflow_versions(
repo = Repo(AIRFLOW_ROOT_PATH)
all_active_tags: list[str] = []
try:
- ref_tags = repo.git.ls_remote("--tags", remote_name).splitlines()
+ # `git.ls_remote` is typed as returning the full union of git-command
return shapes;
+ # with plain args it is always the command output.
+ ref_tags = cast("str", repo.git.ls_remote("--tags",
remote_name)).splitlines()
except GitCommandError as ex:
console_print(
f"[error]Could not fetch tags from `{remote_name}` remote! Make
sure to have it configured.\n"