bpo-33348: parse expressions after * and ** in lib2to3 (GH-6586)

These are valid even in python 2.7


https://bugs.python.org/issue33348



Automerge-Triggered-By: @gpshead
This commit is contained in:
Zsolt Dollenstein 2019-10-23 23:19:07 -07:00 committed by Miss Skeleton (bot)
parent 3bbb6db545
commit 96b06aefe2
6 changed files with 14 additions and 11 deletions

View file

@ -37,10 +37,8 @@ class FixApply(fixer_base.BaseFix):
# I feel like we should be able to express this logic in the
# PATTERN above but I don't know how to do it so...
if args:
if args.type == self.syms.star_expr:
return # Make no change.
if (args.type == self.syms.argument and
args.children[0].value == '**'):
args.children[0].value in {'**', '*'}):
return # Make no change.
if kwds and (kwds.type == self.syms.argument and
kwds.children[0].value == '**'):