This is an automated email from the ASF dual-hosted git repository.
shahar1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new f7abf6fec2d Remove unused decorator default comparison helper (#75849)
f7abf6fec2d is described below
commit f7abf6fec2d96c0b184c2545af068444ae795698
Author: Hussein Awala <[email protected]>
AuthorDate: Thu Oct 29 06:11:53 2026 +0100
Remove unused decorator default comparison helper (#75849)
---
scripts/ci/prek/check_init_decorator_arguments.py | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/scripts/ci/prek/check_init_decorator_arguments.py
b/scripts/ci/prek/check_init_decorator_arguments.py
index 179b16a3121..408e5a4b329 100755
--- a/scripts/ci/prek/check_init_decorator_arguments.py
+++ b/scripts/ci/prek/check_init_decorator_arguments.py
@@ -188,21 +188,6 @@ def _match_arguments(
yield f"[red]Type annotation missing on @{deco_name} argument:
{attr_name}"
-def _match_defaults(
- arg_names: list[str],
- init_def: tuple[str, list[ast.expr]],
- deco_def: tuple[str, list[ast.expr]],
-) -> collections.abc.Iterator[str]:
- init_name, init_defaults = init_def
- deco_name, deco_defaults = deco_def
- for i, (ini, dec) in enumerate(zip(init_defaults, deco_defaults), 1):
- if ast.dump(ini) != ast.dump(dec): # Poorly implemented equality
check.
- yield (
- f"[red]Argument {arg_names[i]!r} default mismatch: "
- f"{init_name} has {ast.unparse(ini)} but @{deco_name} has
{ast.unparse(dec)}"
- )
-
-
def check_dag_init_decorator_arguments() -> int:
dag_mod = ast.parse(DAG_PY.read_text("utf-8"), str(DAG_PY))
tg_mod = ast.parse(TG_PY.read_text("utf-8"), str(TG_PY))