File tree 1 file changed +2
-13
lines changed
1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change 80
80
from uncompyle6 .semantics .check_ast import checker
81
81
from uncompyle6 .semantics .consts import (
82
82
INDENT_PER_LEVEL ,
83
- MAP ,
84
83
NONE ,
85
84
PASS ,
86
85
PRECEDENCE ,
87
86
TABLE_DIRECT ,
88
- TABLE_R ,
89
87
escape ,
90
88
)
89
+ from uncompyle6 .semantics .helper import find_code_node
91
90
from uncompyle6 .semantics .pysource import (
92
91
DEFAULT_DEBUG_OPTS ,
93
92
TREE_DEFAULT_DEBUG ,
@@ -597,17 +596,7 @@ def n_alias(self, node):
597
596
def n_mkfunc (self , node ):
598
597
start = len (self .f .getvalue ())
599
598
600
- if self .version >= (3 , 3 ) or node [- 2 ] == "kwargs" :
601
- # LOAD_CONST code object ..
602
- # LOAD_CONST 'x0' if >= 3.3
603
- # MAKE_FUNCTION ..
604
- code_node = node [- 3 ]
605
- elif node [- 2 ] == "expr" :
606
- code_node = node [- 2 ][0 ]
607
- else :
608
- # LOAD_CONST code object ..
609
- # MAKE_FUNCTION ..
610
- code_node = node [- 2 ]
599
+ code_node = find_code_node (node , - 2 )
611
600
func_name = code_node .attr .co_name
612
601
self .write (func_name )
613
602
self .set_pos_info (code_node , start , len (self .f .getvalue ()))
You can’t perform that action at this time.
0 commit comments