mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
move some imports around
This commit is contained in:
@@ -59,6 +59,7 @@ from jedi import modules
|
|||||||
from jedi import settings
|
from jedi import settings
|
||||||
from jedi.parser import fast as fast_parser
|
from jedi.parser import fast as fast_parser
|
||||||
from jedi.evaluate.cache import memoize_default
|
from jedi.evaluate.cache import memoize_default
|
||||||
|
from jedi.evaluate import iterable
|
||||||
|
|
||||||
# This is something like the sys.path, but only for searching params. It means
|
# This is something like the sys.path, but only for searching params. It means
|
||||||
# that this is the order in which Jedi searches params.
|
# that this is the order in which Jedi searches params.
|
||||||
@@ -294,7 +295,6 @@ def check_flow_information(evaluator, flow, search_name, pos):
|
|||||||
|
|
||||||
|
|
||||||
def _check_isinstance_type(evaluator, stmt, search_name):
|
def _check_isinstance_type(evaluator, stmt, search_name):
|
||||||
from jedi.evaluate import iterable
|
|
||||||
try:
|
try:
|
||||||
expression_list = stmt.expression_list()
|
expression_list = stmt.expression_list()
|
||||||
# this might be removed if we analyze and, etc
|
# this might be removed if we analyze and, etc
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ from jedi import settings
|
|||||||
from jedi._compatibility import use_metaclass
|
from jedi._compatibility import use_metaclass
|
||||||
from jedi.parser import representation as pr
|
from jedi.parser import representation as pr
|
||||||
from jedi.evaluate import builtin
|
from jedi.evaluate import builtin
|
||||||
from jedi.evaluate import dynamic
|
|
||||||
from jedi.evaluate.cache import CachedMetaClass, memoize_default
|
from jedi.evaluate.cache import CachedMetaClass, memoize_default
|
||||||
|
|
||||||
|
|
||||||
@@ -248,11 +247,10 @@ def _check_array_additions(evaluator, compare_array, module, is_list):
|
|||||||
|
|
||||||
from jedi.evaluate import representation as er
|
from jedi.evaluate import representation as er
|
||||||
from jedi import evaluate
|
from jedi import evaluate
|
||||||
from jedi.evaluate import iterable
|
|
||||||
|
|
||||||
def get_execution_parent(element, *stop_classes):
|
def get_execution_parent(element, *stop_classes):
|
||||||
""" Used to get an Instance/FunctionExecution parent """
|
""" Used to get an Instance/FunctionExecution parent """
|
||||||
if isinstance(element, iterable.Array):
|
if isinstance(element, Array):
|
||||||
stmt = element._array.parent
|
stmt = element._array.parent
|
||||||
else:
|
else:
|
||||||
# is an Instance with an ArrayInstance inside
|
# is an Instance with an ArrayInstance inside
|
||||||
@@ -293,6 +291,9 @@ def _check_array_additions(evaluator, compare_array, module, is_list):
|
|||||||
if evaluator.recursion_detector.push_stmt(stmt):
|
if evaluator.recursion_detector.push_stmt(stmt):
|
||||||
# check recursion
|
# check recursion
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# TODO should be deleted in the future
|
||||||
|
from jedi.evaluate import dynamic
|
||||||
res += check_calls(dynamic._scan_statement(stmt, n), n)
|
res += check_calls(dynamic._scan_statement(stmt, n), n)
|
||||||
evaluator.recursion_detector.pop_stmt()
|
evaluator.recursion_detector.pop_stmt()
|
||||||
# reset settings
|
# reset settings
|
||||||
|
|||||||
Reference in New Issue
Block a user