You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
More 2.7 compatibility
This commit is contained in:
@@ -3,9 +3,7 @@
|
||||
from uncompyle6.scanners.tok import Token
|
||||
|
||||
|
||||
def ifstmts_jump(
|
||||
self, lhs, n, rule, ast, tokens, first, last
|
||||
) -> bool:
|
||||
def ifstmts_jump(self, lhs, n, rule, ast, tokens, first, last):
|
||||
come_froms = ast[-1]
|
||||
# Make sure all of the "come froms" offset at the
|
||||
# end of the "if" come from somewhere inside the "if".
|
||||
|
@@ -1,9 +1,7 @@
|
||||
# Copyright (c) 2020 Rocky Bernstein
|
||||
|
||||
|
||||
def while1elsestmt(
|
||||
self, lhs, n, rule, ast, tokens, first, last
|
||||
) -> bool:
|
||||
def while1elsestmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
if last == n:
|
||||
# Adjust for fuzziness in parsing
|
||||
last -= 1
|
||||
|
@@ -1,9 +1,7 @@
|
||||
# Copyright (c) 2020 Rocky Bernstein
|
||||
|
||||
|
||||
def while1stmt(
|
||||
self, lhs, n, rule, ast, tokens, first, last
|
||||
) -> bool:
|
||||
def while1stmt(self, lhs, n, rule, ast, tokens, first, last:
|
||||
|
||||
# If there is a fall through to the COME_FROM_LOOP, then this is
|
||||
# not a while 1. So the instruction before should either be a
|
||||
|
Reference in New Issue
Block a user