Python 3.4 fixes.

This commit is contained in:
Dave Halter
2017-07-31 00:25:15 +02:00
parent 7f6bef19e1
commit 3f836c5841
2 changed files with 12 additions and 2 deletions

View File

@@ -356,14 +356,20 @@ class ErrorFinder(Normalizer):
arg_set = set()
kw_only = False
kw_unpacking_only = False
is_old_starred = False
# In python 3 this would be a bit easier (stars are part of
# argument), but we have to understand both.
for argument in node.children:
if argument == ',':
continue
if argument in ('*', '**'):
# Python 2 has the order engraved in the grammar file.
# No need to do anything here.
# Python < 3.5 has the order engraved in the grammar
# file. No need to do anything here.
is_old_starred = True
continue
if is_old_starred:
is_old_starred = False
continue
if argument.type == 'argument':