Skip to content

Commit

Permalink
fix python callable imports and bump version to post 13
Browse files Browse the repository at this point in the history
  • Loading branch information
TerryYin1777 committed Mar 15, 2024
1 parent 0b83ae8 commit 68599ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dagfactory/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Module contains the version of dag-factory"""
__version__ = "0.17.1.post12"
__version__ = "0.17.1.post13"
4 changes: 3 additions & 1 deletion dagfactory/dagbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 68599ba

Please sign in to comment.