mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd1010bbd2 | ||
|
|
23b3327b1d | ||
|
|
075577d50c |
@@ -3,7 +3,12 @@
|
|||||||
Changelog
|
Changelog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
0.13.0 (2018-01-02)
|
0.13.1 (2018-10-02)
|
||||||
|
+++++++++++++++++++
|
||||||
|
|
||||||
|
- Bugfixes, because tensorflow completions were still slow.
|
||||||
|
|
||||||
|
0.13.0 (2018-10-02)
|
||||||
+++++++++++++++++++
|
+++++++++++++++++++
|
||||||
|
|
||||||
- A small release. Some bug fixes.
|
- A small release. Some bug fixes.
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ As you see Jedi is pretty simple and allows you to concentrate on writing a
|
|||||||
good text editor, while still having very good IDE features for Python.
|
good text editor, while still having very good IDE features for Python.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = '0.13.0'
|
__version__ = '0.13.1'
|
||||||
|
|
||||||
from jedi.api import Script, Interpreter, set_debug_function, \
|
from jedi.api import Script, Interpreter, set_debug_function, \
|
||||||
preload_module, names
|
preload_module, names
|
||||||
|
|||||||
@@ -178,17 +178,22 @@ class Script(object):
|
|||||||
)
|
)
|
||||||
completions = completion.completions()
|
completions = completion.completions()
|
||||||
|
|
||||||
import_completions_count = len([
|
def iter_import_completions():
|
||||||
c for c in completions
|
for c in completions:
|
||||||
if not c._name.tree_name
|
tree_name = c._name.tree_name
|
||||||
or c._name.tree_name.get_definition().type in ('import_name', 'import_from')
|
if tree_name is None:
|
||||||
])
|
continue
|
||||||
if import_completions_count > 10:
|
definition = tree_name.get_definition()
|
||||||
|
if definition is not None \
|
||||||
|
and definition.type in ('import_name', 'import_from'):
|
||||||
|
yield c
|
||||||
|
|
||||||
|
if len(list(iter_import_completions())) > 10:
|
||||||
# For now disable completions if there's a lot of imports that
|
# For now disable completions if there's a lot of imports that
|
||||||
# might potentially be resolved. This is the case for tensorflow
|
# might potentially be resolved. This is the case for tensorflow
|
||||||
# and has been fixed for it. This is obviously temporary until we
|
# and has been fixed for it. This is obviously temporary until we
|
||||||
# have a better solution.
|
# have a better solution.
|
||||||
self._evaluator.infer_enabled = True
|
self._evaluator.infer_enabled = False
|
||||||
|
|
||||||
debug.speed('completions end')
|
debug.speed('completions end')
|
||||||
return completions
|
return completions
|
||||||
|
|||||||
@@ -154,6 +154,9 @@ def global_define():
|
|||||||
#? int()
|
#? int()
|
||||||
global_var_in_func
|
global_var_in_func
|
||||||
|
|
||||||
|
#? ['global_var_in_func']
|
||||||
|
global_var_in_f
|
||||||
|
|
||||||
|
|
||||||
def funct1():
|
def funct1():
|
||||||
# From issue #610
|
# From issue #610
|
||||||
@@ -175,6 +178,7 @@ def init_global_var_predefined():
|
|||||||
#? int() None
|
#? int() None
|
||||||
global_var_predefined
|
global_var_predefined
|
||||||
|
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# within docstrs
|
# within docstrs
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user