Skip to content

Commit

Permalink
Fix _ReplacePythonOperatorByFunctionCall
Browse files Browse the repository at this point in the history
Fix args and keywords incorrectly being processed.
  • Loading branch information
feluelle committed Apr 20, 2022
1 parent a644592 commit 38681ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions airflint/rules/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ def match(self, node):
for keyword in node.value.keywords
if keyword.arg == "op_args"
),
None,
[],
)
kwargs = next(
keywords = next(
(
keyword.value.keywords
for keyword in node.value.keywords
Expand All @@ -117,7 +117,7 @@ def match(self, node):
if keyword.arg == "op_kwargs"
and isinstance(keyword.value, ast.Dict)
),
None,
[],
),
)
replacement = deepcopy(node)
Expand All @@ -127,8 +127,8 @@ def match(self, node):
for keyword in node.value.keywords
if keyword.arg == "python_callable"
),
args=[args] if args else [],
keywords=[kwargs] if kwargs else [],
args=args,
keywords=keywords,
)
return ReplacementAction(node, replacement)

Expand Down

0 comments on commit 38681ef

Please sign in to comment.