You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Handle class with one kwarg subclass
This commit is contained in:
@@ -1393,9 +1393,15 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
def print_super_classes3(self, node):
|
||||
n = len(node) - 1
|
||||
if node.kind != 'expr':
|
||||
assert node[n].kind.startswith('CALL_FUNCTION')
|
||||
if node == 'kwarg':
|
||||
self.write('(')
|
||||
self.template_engine(('%[0]{pattr}=%c', 1), node)
|
||||
self.write(')')
|
||||
return
|
||||
|
||||
kwargs = None
|
||||
assert node[n].kind.startswith('CALL_FUNCTION')
|
||||
|
||||
if node[n].kind.startswith('CALL_FUNCTION_KW'):
|
||||
# 3.6+ starts does this
|
||||
kwargs = node[n-1].attr
|
||||
|
Reference in New Issue
Block a user