mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-02-01 10:32:29 +00:00
Lint-like changes from VSCode
Also allow 3.11 to run this
This commit is contained in:
parent
62b816c60b
commit
8c85260852
4
setup.py
4
setup.py
@ -5,8 +5,8 @@ import sys
|
||||
"""Setup script for the 'uncompyle6' distribution."""
|
||||
|
||||
SYS_VERSION = sys.version_info[0:2]
|
||||
if not ((2, 4) <= SYS_VERSION < (3, 11)):
|
||||
mess = "Python Release 2.6 .. 3.10 are supported in this code branch."
|
||||
if not ((2, 4) <= SYS_VERSION < (3, 12)):
|
||||
mess = "Python Release 2.6 .. 3.11 are supported in this code branch."
|
||||
if (2, 4) <= SYS_VERSION <= (2, 7):
|
||||
mess += (
|
||||
"\nFor your Python, version %s, use the python-2.4 code/branch."
|
||||
|
@ -133,51 +133,34 @@ import sys
|
||||
|
||||
IS_PYPY = "__pypy__" in sys.builtin_module_names
|
||||
|
||||
from xdis import iscode, COMPILER_FLAG_BIT
|
||||
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.parsers.treenode import SyntaxTree
|
||||
from spark_parser import GenericASTTraversal
|
||||
from uncompyle6.scanner import Code, get_scanner
|
||||
import uncompyle6.parser as python_parser
|
||||
from uncompyle6.scanners.tok import Token
|
||||
from uncompyle6.semantics.check_ast import checker
|
||||
|
||||
from uncompyle6.semantics.consts import (ASSIGN_DOC_STRING, ASSIGN_TUPLE_PARAM,
|
||||
INDENT_PER_LEVEL, LINE_LENGTH, MAP,
|
||||
MAP_DIRECT, NAME_MODULE, NONE, PASS,
|
||||
PRECEDENCE, RETURN_LOCALS,
|
||||
RETURN_NONE, TAB, TABLE_R, escape)
|
||||
from uncompyle6.semantics.customize import customize_for_version
|
||||
from uncompyle6.semantics.gencomp import ComprehensionMixin
|
||||
from uncompyle6.semantics.helper import (
|
||||
find_globals_and_nonlocals,
|
||||
print_docstring
|
||||
)
|
||||
from uncompyle6.semantics.make_function1 import make_function1
|
||||
from uncompyle6.semantics.make_function2 import make_function2
|
||||
from uncompyle6.semantics.make_function3 import make_function3
|
||||
from uncompyle6.semantics.make_function36 import make_function36
|
||||
from uncompyle6.semantics.parser_error import ParserError
|
||||
from uncompyle6.semantics.customize import customize_for_version
|
||||
from uncompyle6.semantics.gencomp import ComprehensionMixin
|
||||
from uncompyle6.semantics.helper import (
|
||||
print_docstring,
|
||||
find_globals_and_nonlocals,
|
||||
)
|
||||
|
||||
from uncompyle6.scanners.tok import Token
|
||||
|
||||
from uncompyle6.semantics.n_actions import NonterminalActions
|
||||
from uncompyle6.semantics.transform import is_docstring, TreeTransform
|
||||
from uncompyle6.semantics.consts import (
|
||||
ASSIGN_DOC_STRING,
|
||||
ASSIGN_TUPLE_PARAM,
|
||||
INDENT_PER_LEVEL,
|
||||
LINE_LENGTH,
|
||||
MAP,
|
||||
MAP_DIRECT,
|
||||
NAME_MODULE,
|
||||
NONE,
|
||||
PASS,
|
||||
PRECEDENCE,
|
||||
RETURN_LOCALS,
|
||||
RETURN_NONE,
|
||||
TAB,
|
||||
TABLE_R,
|
||||
escape,
|
||||
)
|
||||
|
||||
|
||||
from uncompyle6.semantics.parser_error import ParserError
|
||||
from uncompyle6.semantics.transform import TreeTransform, is_docstring
|
||||
from uncompyle6.show import maybe_show_tree
|
||||
from uncompyle6.util import better_repr
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2019-2021 by Rocky Bernstein
|
||||
# Copyright (c) 2019-2022 by Rocky Bernstein
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -432,7 +432,7 @@ class TreeTransform(GenericASTTraversal, object):
|
||||
if sstmt[0] == "ann_assign":
|
||||
sstmt[0] = ann_assign_init
|
||||
else:
|
||||
sstmt[0][0] = ann_assing_init
|
||||
sstmt[0][0] = ann_assign_init
|
||||
sstmt[0].transformed_by = "n_stmts"
|
||||
pass
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user