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

@ -27,10 +27,8 @@ class FixReload(fixer_base.BaseFix):
# PATTERN above but I don't know how to do it so...
obj = results['obj']
if obj:
if obj.type == self.syms.star_expr:
return # Make no change.
if (obj.type == self.syms.argument and
obj.children[0].value == '**'):
obj.children[0].value in {'**', '*'}):
return # Make no change.
names = ('importlib', 'reload')
new = ImportAndCall(node, results, names)