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.6-to-3.10' into python-3.3-to-3.5
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
default_language_version:
|
||||
python: python
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: check-merge-conflict
|
||||
- id: debug-statements
|
||||
stages: [commit]
|
||||
- id: end-of-file-fixer
|
||||
stages: [commit]
|
@@ -17,7 +17,7 @@ cd $mydir
|
||||
|
||||
(cd $fulldir/.. && \
|
||||
setup_version python-spark python-2.4 && \
|
||||
setup_verseion python-xdis python-2.4-to-2.7)
|
||||
setup_version python-xdis python-2.4-to-2.7)
|
||||
|
||||
|
||||
checkout_finish python-2.4-to-2.7
|
||||
|
BIN
test/bytecode_2.7/06_nop.pyc
Normal file
BIN
test/bytecode_2.7/06_nop.pyc
Normal file
Binary file not shown.
BIN
test/bytecode_3.6/06_nop.pyc
Normal file
BIN
test/bytecode_3.6/06_nop.pyc
Normal file
Binary file not shown.
@@ -391,6 +391,10 @@ class PythonParser(GenericASTBuilder):
|
||||
|
||||
returns ::= return
|
||||
returns ::= _stmts return
|
||||
|
||||
# NOP
|
||||
stmt ::= nop_stmt
|
||||
nop_stmt ::= NOP
|
||||
|
||||
"""
|
||||
pass
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import re
|
||||
|
||||
from uncompyle6.semantics.consts import INDENT_PER_LEVEL, PRECEDENCE, TABLE_DIRECT
|
||||
from uncompyle6.semantics.consts import INDENT_PER_LEVEL, PRECEDENCE
|
||||
from uncompyle6.semantics.helper import flatten_list
|
||||
|
||||
# FIXME get from a newer xdis
|
||||
|
@@ -1216,6 +1216,7 @@ class SourceWalker(GenericASTTraversal, NonterminalActions, ComprehensionMixin):
|
||||
is_lambda=False,
|
||||
noneInNames=False,
|
||||
is_top_level_module=False,
|
||||
compile_mode="exec",
|
||||
) -> GenericASTTraversal:
|
||||
# FIXME: DRY with fragments.py
|
||||
|
||||
@@ -1266,7 +1267,6 @@ class SourceWalker(GenericASTTraversal, NonterminalActions, ComprehensionMixin):
|
||||
load_const.kind == "LOAD_CONST"
|
||||
and load_const.linestart is None
|
||||
and load_const.attr is None
|
||||
or is_top_level_module
|
||||
):
|
||||
# Delete LOAD_CONST (None) RETURN_VALUE
|
||||
del tokens[-2:]
|
||||
@@ -1375,6 +1375,7 @@ def code_deparse(
|
||||
co,
|
||||
is_lambda=is_lambda_mode(compile_mode),
|
||||
is_top_level_module=is_top_level_module,
|
||||
compile_mode=compile_mode,
|
||||
)
|
||||
|
||||
# XXX workaround for profiling
|
||||
|
Reference in New Issue
Block a user