You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Make ScannerXX() initialization the same on Python 2.x and 3.x
This commit is contained in:
@@ -289,13 +289,13 @@ def get_scanner(version):
|
||||
|
||||
if version == 2.7:
|
||||
import uncompyle6.scanners.scanner27 as scan
|
||||
scanner = scan.Scanner27()
|
||||
scanner = scan.Scanner27(version)
|
||||
elif version == 2.6:
|
||||
import uncompyle6.scanners.scanner26 as scan
|
||||
scanner = scan.Scanner26()
|
||||
scanner = scan.Scanner26(version)
|
||||
elif version == 2.5:
|
||||
import uncompyle6.scanners.scanner25 as scan
|
||||
scanner = scan.Scanner25()
|
||||
scanner = scan.Scanner25(version)
|
||||
elif version == 3.2:
|
||||
import uncompyle6.scanners.scanner32 as scan
|
||||
scanner = scan.Scanner32(version)
|
||||
|
@@ -20,7 +20,7 @@ from uncompyle6.opcodes.opcode_25 import *
|
||||
import uncompyle6.scanner as scan
|
||||
|
||||
class Scanner25(scan.Scanner):
|
||||
def __init__(self):
|
||||
def __init__(self, version):
|
||||
scan.Scanner.__init__(self, 2.5) # check
|
||||
|
||||
def disassemble(self, co, classname=None, code_objects={}):
|
||||
|
@@ -19,7 +19,7 @@ import dis
|
||||
import uncompyle6.scanner as scan
|
||||
|
||||
class Scanner26(scan.Scanner):
|
||||
def __init__(self):
|
||||
def __init__(self, version):
|
||||
scan.Scanner.__init__(self, 2.5) # check
|
||||
|
||||
def disassemble(self, co, classname=None, code_objects={}):
|
||||
|
@@ -22,7 +22,7 @@ from uncompyle6.opcodes.opcode_27 import * # NOQA
|
||||
import uncompyle6.scanner as scan
|
||||
|
||||
class Scanner27(scan.Scanner):
|
||||
def __init__(self):
|
||||
def __init__(self, version):
|
||||
scan.Scanner.__init__(self, 2.7) # check
|
||||
|
||||
def disassemble(self, co, classname=None, code_objects={}):
|
||||
|
Reference in New Issue
Block a user