From 5bfc34b2e08c99c721044c304c23e7484b484f5c Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Tue, 24 Dec 2024 17:08:56 +0530 Subject: [PATCH] Remove redundant check for positional arguments This was missed in the refactor: https://github.com/apache/airflow/pull/19965 -- since the `task_decorator_factory` enforces keyword-only parameters for via the `*` in its signature. --- airflow/decorators/base.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/airflow/decorators/base.py b/airflow/decorators/base.py index 9b303e1a703e7..b095f2e29bbff 100644 --- a/airflow/decorators/base.py +++ b/airflow/decorators/base.py @@ -684,8 +684,6 @@ def task_decorator_factory( kwargs=kwargs, ) return cast(TaskDecorator, decorator) - elif python_callable is not None: - raise TypeError("No args allowed while using @task, use kwargs instead") def decorator_factory(python_callable): return _TaskDecorator(