forked from VimPlug/jedi
Merge branch 'dev' into repl
This commit is contained in:
+1
-1
@@ -34,7 +34,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.
|
||||
"""
|
||||
|
||||
__version__ = 0, 6, 0
|
||||
__version__ = 0, 7, 0
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
+2
-2
@@ -787,8 +787,8 @@ def follow_path(path, scope, call_scope, position=None):
|
||||
|
||||
def filter_private_variable(scope, call_scope, var_name):
|
||||
"""private variables begin with a double underline `__`"""
|
||||
if isinstance(var_name, (str, unicode)) \
|
||||
and var_name.startswith('__') and isinstance(scope, er.Instance):
|
||||
if isinstance(var_name, (str, unicode)) and isinstance(scope, er.Instance)\
|
||||
and var_name.startswith('__') and not var_name.endswith('__'):
|
||||
s = call_scope.get_parent_until((pr.Class, er.Instance))
|
||||
if s != scope and s != scope.base.base:
|
||||
return True
|
||||
|
||||
@@ -769,6 +769,8 @@ class Generator(use_metaclass(cache.CachedMetaClass, pr.Base)):
|
||||
none_pos, none_pos)
|
||||
if n in executes_generator:
|
||||
name.parent = self
|
||||
else:
|
||||
name.parent = builtin.Builtin.scope
|
||||
names.append(name)
|
||||
debug.dbg('generator names', names)
|
||||
return names
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
"""
|
||||
``PYTHONSTARTUP`` to use Jedi in your Python interpreter.
|
||||
|
||||
To use Jedi completion in Python interpreter, add the following in your shell
|
||||
setup (e.g., ``.bashrc``)::
|
||||
|
||||
|
||||
+7
-4
@@ -13,11 +13,14 @@ def setup_readline():
|
||||
Install Jedi completer to :mod:`readline`.
|
||||
|
||||
This function setups :mod:`readline` to use Jedi in Python interactive
|
||||
shell. If you want to use custom ``PYTHONSTARTUP`` file, you can call
|
||||
this function like this:
|
||||
shell. If you want to use a custom ``PYTHONSTARTUP`` file (typically
|
||||
``$HOME/.pythonrc.py``), you can add this piece of code:
|
||||
|
||||
>>> from jedi.utils import setup_readline
|
||||
>>> setup_readline()
|
||||
>>> try:
|
||||
>>> from jedi.utils import setup_readline
|
||||
>>> setup_readline()
|
||||
>>> except ImportError:
|
||||
>>> print('Install Jedi with pip! No autocompletion otherwise.')
|
||||
|
||||
"""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user