You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Correct imports
This commit is contained in:
@@ -135,8 +135,7 @@ from spark_parser import GenericASTTraversal
|
||||
from xdis import COMPILER_FLAG_BIT, iscode
|
||||
from xdis.version_info import PYTHON_VERSION_TRIPLE
|
||||
|
||||
import uncompyle6.parser as python_parser
|
||||
from uncompyle6.parser import get_python_parser
|
||||
from uncompyle6.parser import parse, get_python_parser
|
||||
from uncompyle6.parsers.treenode import SyntaxTree
|
||||
from uncompyle6.scanner import Code, get_scanner
|
||||
from uncompyle6.scanners.tok import Token
|
||||
@@ -1181,11 +1180,11 @@ class SourceWalker(GenericASTTraversal, NonterminalActions, ComprehensionMixin):
|
||||
p_insts = self.p.insts
|
||||
self.p.insts = self.scanner.insts
|
||||
self.p.offset2inst_index = self.scanner.offset2inst_index
|
||||
ast = python_parser.parse(self.p, tokens, customize, code)
|
||||
ast = parse(self.p, tokens, customize, code)
|
||||
self.customize(customize)
|
||||
self.p.insts = p_insts
|
||||
|
||||
except (python_parser.ParserError, AssertionError) as e:
|
||||
except (ParserError, AssertionError) as e:
|
||||
raise ParserError(e, tokens, self.p.debug["reduce"])
|
||||
transform_tree = self.treeTransform.transform(ast, code)
|
||||
self.maybe_show_tree(ast, phase="after")
|
||||
@@ -1220,9 +1219,9 @@ class SourceWalker(GenericASTTraversal, NonterminalActions, ComprehensionMixin):
|
||||
self.p.insts = self.scanner.insts
|
||||
self.p.offset2inst_index = self.scanner.offset2inst_index
|
||||
self.p.opc = self.scanner.opc
|
||||
ast = python_parser.parse(self.p, tokens, customize, code)
|
||||
ast = parse(self.p, tokens, customize, code)
|
||||
self.p.insts = p_insts
|
||||
except (python_parser.ParserError, AssertionError) as e:
|
||||
except (ParserError, AssertionError) as e:
|
||||
raise ParserError(e, tokens, self.p.debug["reduce"])
|
||||
|
||||
checker(ast, False, self.ast_errors)
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# More could be done here though.
|
||||
|
||||
from math import copysign
|
||||
from xdis.codetype import UnicodeForPython3
|
||||
from xdis.cross_types import UnicodeForPython3
|
||||
from xdis.version_info import PYTHON_VERSION_TRIPLE
|
||||
|
||||
def get_code_name(code) -> str:
|
||||
|
Reference in New Issue
Block a user