mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 23:04:48 +08:00
Remove literal_eval compatibility
This commit is contained in:
@@ -204,13 +204,6 @@ except ImportError:
|
|||||||
import __builtin__ as builtins # noqa: F401
|
import __builtin__ as builtins # noqa: F401
|
||||||
|
|
||||||
|
|
||||||
import ast # noqa: F401
|
|
||||||
|
|
||||||
|
|
||||||
def literal_eval(string):
|
|
||||||
return ast.literal_eval(string)
|
|
||||||
|
|
||||||
|
|
||||||
def utf8_repr(func):
|
def utf8_repr(func):
|
||||||
"""
|
"""
|
||||||
``__repr__`` methods in Python 2 don't allow unicode objects to be
|
``__repr__`` methods in Python 2 don't allow unicode objects to be
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
import textwrap
|
import textwrap
|
||||||
|
from ast import literal_eval
|
||||||
from inspect import cleandoc
|
from inspect import cleandoc
|
||||||
from weakref import WeakKeyDictionary
|
from weakref import WeakKeyDictionary
|
||||||
|
|
||||||
@@ -7,7 +8,7 @@ from parso.python import tree
|
|||||||
from parso.cache import parser_cache
|
from parso.cache import parser_cache
|
||||||
from parso import split_lines
|
from parso import split_lines
|
||||||
|
|
||||||
from jedi._compatibility import literal_eval, force_unicode
|
from jedi._compatibility import force_unicode
|
||||||
|
|
||||||
_EXECUTE_NODES = {'funcdef', 'classdef', 'import_from', 'import_name', 'test',
|
_EXECUTE_NODES = {'funcdef', 'classdef', 'import_from', 'import_name', 'test',
|
||||||
'or_test', 'and_test', 'not_test', 'comparison', 'expr',
|
'or_test', 'and_test', 'not_test', 'comparison', 'expr',
|
||||||
|
|||||||
Reference in New Issue
Block a user