forked from VimPlug/jedi
Remove the disabling of dynamic flow information
We should be able to handle this anyway also in completions. Don't hide issues here.
This commit is contained in:
@@ -241,9 +241,6 @@ class Script(object):
|
|||||||
|
|
||||||
:rtype: list of :class:`classes.Definition`
|
:rtype: list of :class:`classes.Definition`
|
||||||
"""
|
"""
|
||||||
temp, settings.dynamic_flow_information = \
|
|
||||||
settings.dynamic_flow_information, False
|
|
||||||
try:
|
|
||||||
module_node = self._get_module_node()
|
module_node = self._get_module_node()
|
||||||
user_stmt = get_statement_of_position(module_node, self._pos)
|
user_stmt = get_statement_of_position(module_node, self._pos)
|
||||||
definition_names = self._goto()
|
definition_names = self._goto()
|
||||||
@@ -267,8 +264,6 @@ class Script(object):
|
|||||||
modules = set([d.get_root_context() for d in definition_names])
|
modules = set([d.get_root_context() for d in definition_names])
|
||||||
modules.add(self._get_module())
|
modules.add(self._get_module())
|
||||||
definitions = usages.usages(self._evaluator, definition_names, modules)
|
definitions = usages.usages(self._evaluator, definition_names, modules)
|
||||||
finally:
|
|
||||||
settings.dynamic_flow_information = temp
|
|
||||||
|
|
||||||
return helpers.sorted_definitions(set(definitions))
|
return helpers.sorted_definitions(set(definitions))
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ from jedi.evaluate import compiled
|
|||||||
from jedi.evaluate.base_context import TreeContext
|
from jedi.evaluate.base_context import TreeContext
|
||||||
from jedi.evaluate.imports import SubModuleName, infer_import
|
from jedi.evaluate.imports import SubModuleName, infer_import
|
||||||
|
|
||||||
|
|
||||||
class _ModuleAttributeName(AbstractNameDefinition):
|
class _ModuleAttributeName(AbstractNameDefinition):
|
||||||
"""
|
"""
|
||||||
For module attributes like __file__, __str__ and so on.
|
For module attributes like __file__, __str__ and so on.
|
||||||
|
|||||||
Reference in New Issue
Block a user