Skip to content

Commit

Permalink
Update airflow/utils/decorators.py
Browse files Browse the repository at this point in the history
Co-authored-by: Wei Lee <[email protected]>
  • Loading branch information
josix and Lee-W authored Feb 6, 2025
1 parent 696e0ea commit 6df6641
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion airflow/utils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def __init__(self, task_decorator_name: str) -> None:
}

def _is_task_decorator(self, decorator_node: cst.Decorator) -> bool:
if isinstance(decorator_node.decorator, cst.Name):
decorator_expr = decorator_node.decorator
if isinstance(decorator_expr, cst.Name):
return decorator_node.decorator.value in self.decorators_to_remove
elif isinstance(decorator_node.decorator, cst.Attribute) and isinstance(
decorator_node.decorator.value, cst.Name
Expand Down

0 comments on commit 6df6641

Please sign in to comment.