Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 36e1194

Browse files
author
Juanjo Alvarez
committed
Fix too eager conversion of the arguments type
Signed-off-by: Juanjo Alvarez <[email protected]>
1 parent 9e16214 commit 36e1194

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

native/python_package/python_driver/astimprove.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,9 @@ def match_default_args(args: List[Node], defaults: List[Node]) -> List[Node]:
187187
return args
188188

189189
def name2arg(node: Node):
190-
node["ast_type"] = "arg"
190+
# Normalize Python2 and 3 argument types
191+
if node["ast_type"] == "Name":
192+
node["ast_type"] = "arg"
191193
id_ = node.get("id")
192194
if id_:
193195
node["@token"] = node["id"]

0 commit comments

Comments
 (0)