Skip to content

Commit

Permalink
Support any type of function call receivers
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Oct 24, 2024
1 parent 8b4398e commit 990ac76
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rewrite/rewrite/python/_parser_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1109,12 +1109,10 @@ def visit_Call(self, node):
self.__map_type(node.func.value),
None
)
elif isinstance(node.func, (ast.Call, ast.Lambda, ast.Subscript)):
else:
select = self.__pad_right(cast(Expression, self.__convert(node.func)), self.__whitespace())
# printer handles empty name by not printing `.` before it
name = self.__convert_name('')
else:
raise NotImplementedError(f"Calls to functions other than methods are not yet supported: {type(node.func)}")

all_args = self.__sort_call_arguments(node)
args = JContainer(
Expand Down

0 comments on commit 990ac76

Please sign in to comment.