You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
further work on supporting single and multiple fstring decompilation
This commit is contained in:
@@ -633,7 +633,8 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
#######################
|
||||
TABLE_DIRECT.update({
|
||||
'fstring_expr': ( "{%c%{conversion}}", 0),
|
||||
'fstring': ( "f'%c'", 0),
|
||||
'fstring_single': ( "f'{%c%{conversion}}'", 0),
|
||||
'fstring_multi': ( "f'%c'", 0),
|
||||
})
|
||||
return
|
||||
|
||||
@@ -1893,6 +1894,9 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
node.conversion = self.FSTRING_CONVERSION_MAP.get(node.data[1].attr, '')
|
||||
self.default(node)
|
||||
|
||||
def n_fstring_single(self, node):
|
||||
return self.n_fstring_expr(node)
|
||||
|
||||
def engine(self, entry, startnode):
|
||||
"""The format template interpetation engine. See the comment at the
|
||||
beginning of this module for the how we interpret format specifications such as
|
||||
|
Reference in New Issue
Block a user