forked from VimPlug/jedi
fix the remaining refactoring problems
This commit is contained in:
@@ -12,6 +12,7 @@ __all__ = ['Script', 'NotFoundError', 'set_debug_function', '_quick_complete']
|
||||
import re
|
||||
import os
|
||||
|
||||
import parsing
|
||||
import parsing_representation as pr
|
||||
import dynamic
|
||||
import imports
|
||||
@@ -188,7 +189,7 @@ class Script(object):
|
||||
return scopes
|
||||
|
||||
def _get_under_cursor_stmt(self, cursor_txt):
|
||||
r = pr.Parser(cursor_txt, no_docstr=True)
|
||||
r = parsing.Parser(cursor_txt, no_docstr=True)
|
||||
try:
|
||||
stmt = r.module.statements[0]
|
||||
except IndexError:
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import re
|
||||
|
||||
import evaluate
|
||||
import parsing
|
||||
import parsing_representation as pr
|
||||
|
||||
DOCSTRING_PARAM_PATTERNS = [
|
||||
@@ -34,7 +35,7 @@ def follow_param(param):
|
||||
param_str)
|
||||
user_position = (2, 0)
|
||||
|
||||
p = pr.Parser(param_str, None, user_position,
|
||||
p = parsing.Parser(param_str, None, user_position,
|
||||
no_docstr=True)
|
||||
return evaluate.follow_statement(p.user_stmt)
|
||||
return []
|
||||
@@ -98,7 +99,7 @@ def find_return_types(func):
|
||||
if not type_str:
|
||||
return []
|
||||
|
||||
p = pr.Parser(type_str, None, (1, 0), no_docstr=True)
|
||||
p = parsing.Parser(type_str, None, (1, 0), no_docstr=True)
|
||||
p.user_stmt.parent = func
|
||||
return list(evaluate.follow_statement(p.user_stmt))
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ class CachedFastParser(type):
|
||||
return parsing.Parser(source, module_path, user_position)
|
||||
|
||||
pi = cache.parser_cache.get(module_path, None)
|
||||
if pi is None or isinstance(pi.parser, pr.Parser):
|
||||
if pi is None or isinstance(pi.parser, parsing.Parser):
|
||||
p = super(CachedFastParser, self).__call__(source, module_path,
|
||||
user_position)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user