From 68599bacf5f8084cea8e97988f3ca4970dc4f40f Mon Sep 17 00:00:00 2001 From: Terry Yin Date: Fri, 15 Mar 2024 12:47:46 -0400 Subject: [PATCH] fix python callable imports and bump version to post 13 --- dagfactory/__version__.py | 2 +- dagfactory/dagbuilder.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dagfactory/__version__.py b/dagfactory/__version__.py index 05480198..868ac5cc 100644 --- a/dagfactory/__version__.py +++ b/dagfactory/__version__.py @@ -1,2 +1,2 @@ """Module contains the version of dag-factory""" -__version__ = "0.17.1.post12" +__version__ = "0.17.1.post13" diff --git a/dagfactory/dagbuilder.py b/dagfactory/dagbuilder.py index a0f758b4..f738ef72 100644 --- a/dagfactory/dagbuilder.py +++ b/dagfactory/dagbuilder.py @@ -305,7 +305,9 @@ def make_task(operator: str, task_params: Dict[str, Any]) -> BaseOperator: raise Exception(f"Failed to import operator: {operator}") from err # pylint: disable=too-many-nested-blocks try: - if operator_obj in [PythonOperator, BranchPythonOperator, PythonSensor, ShortCircuitOperator]: + if (operator_obj in [PythonOperator, BranchPythonOperator, PythonSensor, ShortCircuitOperator] + or issubclass(operator_obj, PythonOperator) + or issubclass(operator_obj, PythonSensor)): if ( not task_params.get("python_callable") and not task_params.get("python_callable_name")