Commit dd6516e7 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

round_trace: fix the detection of arguments

parent eedbf224
......@@ -29,13 +29,13 @@ class FixRoundTrace(BaseDynamicTraceFix):
def transform(self, node, results):
args = results['args']
if args.type == lib2to3.pgen2.token.NUMBER:
# e.g. round(1.23)
# e.g. round(1.23, 4)
if args.type == syms.arglist:
children = [leaf.clone() for leaf in args.children]
# e.g. round(1.23)
else:
children = [
args.clone()
]
else:
# e.g. round(1,23, 4)
children = [leaf.clone() for leaf in args.children]
node.replace(self.traced_call(node, children))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment