Handle BUILD_CONST_KEY_MAP as a varargs

custom rules with BUILD_CONST_KEY_MAP are pinned to the specific number
of args seen.
This commit is contained in:
rocky
2017-01-20 20:41:10 -05:00
parent e9057f378a
commit 8333e4ae93
3 changed files with 5 additions and 2 deletions

View File

@@ -1426,7 +1426,7 @@ class SourceWalker(GenericASTTraversal, object):
i += 3
pass
pass
elif node[-1].type == 'BUILD_CONST_KEY_MAP':
elif node[-1].type.startswith('BUILD_CONST_KEY_MAP'):
# Python 3.6+ style const map
keys = node[-2].pattr
values = node[:-2]