Description
In version 3.8.0 when trying to decompile python 3.0 code looks like the self.version member of instantiated Scanner30 class expects in its class methods a float value instead of the provided tuple (major, minor) == (3, 0).
How to Reproduce
$ version_info = (3, 0)
$ uncompyle6.main.decompile(version_info, my_code, out_string_stream)
Output Given
uncompyle6.main.decompile(version_info, code, string_stream)
File "C:\my-env\lib\site-packages\uncompyle6\main.py", line 133, in decompile
deparsed = deparse_fn(
File "C:\my-env\lib\site-packages\uncompyle6\semantics\pysource.py", line 2576, in code_deparse
tokens, customize = scanner.ingest(
File "C:\my-env\lib\site-packages\uncompyle6\scanners\scanner3.py", line 292, in ingest
jump_targets = self.find_jump_targets(show_asm)
File "C:\my-env\lib\site-packages\uncompyle6\scanners\scanner3.py", line 583, in find_jump_targets
self.detect_control_flow(offset, targets, i)
File "C:\my-env\lib\site-packages\uncompyle6\scanners\scanner30.py", line 440, in detect_control_flow
elif self.version >= 3.5:
TypeError: '>=' not supported between instances of 'tuple' and 'float'
Expected behavior
The code should be decompiled successfully
Environment
- python 3.9.13
- uncompyle 3.8.0
- Windows OS
Workarounds
None
Priority
Additional Context
Description
In version 3.8.0 when trying to decompile python 3.0 code looks like the self.version member of instantiated Scanner30 class expects in its class methods a float value instead of the provided tuple (major, minor) == (3, 0).
How to Reproduce
Output Given
Expected behavior
The code should be decompiled successfully
Environment
Workarounds
None
Priority
Additional Context