You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Merge branch 'python-3.3-to-3.5' into python-3.0-to-3.2
This commit is contained in:
@@ -79,7 +79,7 @@ entry_points = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
ftp_url = None
|
ftp_url = None
|
||||||
install_requires = ["click", "spark-parser >= 1.8.9, < 1.9.0", "xdis >= 6.0.8, < 6.2.0"]
|
install_requires = ["click", "spark-parser >= 1.8.9, < 1.9.0", "xdis >= 6.1.1, < 6.2.0"]
|
||||||
|
|
||||||
license = "GPL3"
|
license = "GPL3"
|
||||||
mailing_list = "python-debugger@googlegroups.com"
|
mailing_list = "python-debugger@googlegroups.com"
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
# Copyright (c) 2020 Rocky Bernstein
|
# Copyright (c) 2020 Rocky Bernstein
|
||||||
|
|
||||||
|
|
||||||
def except_handler(self, lhs, n, rule, ast, tokens, first, last):
|
def except_handler(self, lhs, n, rule, ast, tokens, first, last):
|
||||||
end_token = tokens[last-1]
|
end_token = tokens[last - 1]
|
||||||
|
|
||||||
# print("XXX", first, last)
|
# print("XXX", first, last)
|
||||||
# for t in range(first, last):
|
# for t in range(first, last):
|
||||||
@@ -13,7 +14,7 @@ def except_handler(self, lhs, n, rule, ast, tokens, first, last):
|
|||||||
if self.version[:2] == (1, 4):
|
if self.version[:2] == (1, 4):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Make sure come froms all come from within "except_handler".
|
# Make sure COME_FROMs froms come from within "except_handler".
|
||||||
if end_token != "COME_FROM":
|
if end_token != "COME_FROM":
|
||||||
return False
|
return False
|
||||||
return end_token.attr < tokens[first].offset
|
return end_token.attr < tokens[first].offset
|
||||||
|
@@ -172,7 +172,7 @@ def ifelsestmt(self, lhs, n, rule, tree, tokens, first, last):
|
|||||||
if raise_stmt1 == "raise_stmt1" and raise_stmt1[0] in ("LOAD_ASSERT",):
|
if raise_stmt1 == "raise_stmt1" and raise_stmt1[0] in ("LOAD_ASSERT",):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Make sure all the offsets from the "come froms" at the
|
# Make sure all the offsets from the "COME_FROMs" at the
|
||||||
# end of the "if" come from somewhere inside the "if".
|
# end of the "if" come from somewhere inside the "if".
|
||||||
# Since the come_froms are ordered so that lowest
|
# Since the come_froms are ordered so that lowest
|
||||||
# offset COME_FROM is last, it is sufficient to test
|
# offset COME_FROM is last, it is sufficient to test
|
||||||
|
@@ -433,7 +433,7 @@ TABLE_DIRECT = {
|
|||||||
# function_def_async
|
# function_def_async
|
||||||
"mkfuncdeco0": ("%|def %c\n", (0, ("mkfunc", "mkfunc_annotate"))),
|
"mkfuncdeco0": ("%|def %c\n", (0, ("mkfunc", "mkfunc_annotate"))),
|
||||||
|
|
||||||
# In cases where we desire an explict new line.
|
# In cases where we desire an explicit new line.
|
||||||
# After docstrings which are followed by a "def" is
|
# After docstrings which are followed by a "def" is
|
||||||
# one situations where Python formatting desires two newlines,
|
# one situations where Python formatting desires two newlines,
|
||||||
# and this is added, as a transformation rule.
|
# and this is added, as a transformation rule.
|
||||||
|
Reference in New Issue
Block a user