You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Localize call_kw precedence to 3.6
This commit is contained in:
@@ -381,7 +381,6 @@ PRECEDENCE = {
|
|||||||
'ret_cond_not': 28,
|
'ret_cond_not': 28,
|
||||||
|
|
||||||
'_mklambda': 30,
|
'_mklambda': 30,
|
||||||
'call_kw': 100, # 100 seems to to be module/function precidence
|
|
||||||
'yield': 101,
|
'yield': 101,
|
||||||
'yield_from': 101
|
'yield_from': 101
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from uncompyle6.semantics.consts import (
|
from uncompyle6.semantics.consts import (
|
||||||
INDENT_PER_LEVEL, TABLE_R, TABLE_DIRECT)
|
PRECEDENCE, INDENT_PER_LEVEL, TABLE_R, TABLE_DIRECT)
|
||||||
|
|
||||||
from uncompyle6.semantics.make_function import (
|
from uncompyle6.semantics.make_function import (
|
||||||
make_function3_annotate,
|
make_function3_annotate,
|
||||||
@@ -353,6 +353,10 @@ def customize_for_version(self, is_pypy, version):
|
|||||||
# Python 3.6+ Additions
|
# Python 3.6+ Additions
|
||||||
#######################
|
#######################
|
||||||
|
|
||||||
|
# Value 100 is important; it is exactly
|
||||||
|
# module/function precidence.
|
||||||
|
PRECEDENCE['call_kw'] = 100
|
||||||
|
|
||||||
TABLE_DIRECT.update({
|
TABLE_DIRECT.update({
|
||||||
'tryfinally36': ( '%|try:\n%+%c%-%|finally:\n%+%c%-\n\n',
|
'tryfinally36': ( '%|try:\n%+%c%-%|finally:\n%+%c%-\n\n',
|
||||||
(1, 'returns'), 3 ),
|
(1, 'returns'), 3 ),
|
||||||
|
Reference in New Issue
Block a user