Pypy 3.6 fixes and tests

This commit is contained in:
rocky
2019-10-29 11:43:09 -04:00
parent ade9f7a182
commit 0a5fcc51d8
6 changed files with 73 additions and 20 deletions

View File

@@ -1566,8 +1566,6 @@ class SourceWalker(GenericASTTraversal, object):
assert node[n].kind.startswith("CALL_FUNCTION")
if node[n].kind.startswith("CALL_FUNCTION_KW"):
# 3.6+ starts doing this
kwargs = node[n - 1].attr
if self.is_pypy:
# FIXME: this doesn't handle positional and keyword args
# properly. Need to do something more like that below
@@ -1575,7 +1573,7 @@ class SourceWalker(GenericASTTraversal, object):
self.template_engine(('(%[0]{attr}=%c)', 1), node[n-1])
return
else:
kwargs = node[n-1].attr
kwargs = node[n - 1].attr
assert isinstance(kwargs, tuple)
i = n - (len(kwargs) + 1)