You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Correct 3.6ish dictionary literals printing
This commit is contained in:
Binary file not shown.
@@ -242,13 +242,13 @@ class NonterminalActions:
|
|||||||
self.line_number = elem.linestart
|
self.line_number = elem.linestart
|
||||||
else:
|
else:
|
||||||
if sep != "":
|
if sep != "":
|
||||||
sep += " "
|
sep += ", "
|
||||||
elif line_len > 80:
|
elif line_len > 80:
|
||||||
next_indent = self.indent + INDENT_PER_LEVEL[:-1]
|
next_indent = self.indent + INDENT_PER_LEVEL[:-1]
|
||||||
line_len = len(next_indent)
|
line_len = len(next_indent)
|
||||||
sep += "\n" + next_indent
|
sep += "\n" + next_indent
|
||||||
|
|
||||||
sep_key_value = f" {repr(keys[i])}: {value}"
|
sep_key_value = f"{sep}{repr(keys[i])}: {value}"
|
||||||
line_len += len(sep_key_value)
|
line_len += len(sep_key_value)
|
||||||
self.write(sep_key_value)
|
self.write(sep_key_value)
|
||||||
sep = ", "
|
sep = ", "
|
||||||
|
Reference in New Issue
Block a user