From d9f32f650b5a1f4e7a9646011da415d27e18a210 Mon Sep 17 00:00:00 2001 From: Elizaveta Shashkova Date: Mon, 2 Apr 2018 18:45:21 +0300 Subject: [PATCH] Fix ValueError for IPython 6.3 (PY-29313) --- .../pydev/_pydev_bundle/pydev_ipython_console_011.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py b/python/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py index 2b6061e1d970..87823b1ddba4 100644 --- a/python/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py +++ b/python/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py @@ -76,7 +76,6 @@ def create_editor_hook(pydev_host, pydev_client_port): return call_editor - class PyDevIPCompleter(IPCompleter): def __init__(self, *args, **kwargs): @@ -84,7 +83,10 @@ class PyDevIPCompleter(IPCompleter): in addition to the completion support provided by IPython """ IPCompleter.__init__(self, *args, **kwargs) # Use PyDev for python matches, see getCompletions below - self.matchers.remove(self.python_matches) + if self.python_matches in self.matchers: + # `self.python_matches` matches attributes or global python names + self.matchers.remove(self.python_matches) + class PyDevTerminalInteractiveShell(TerminalInteractiveShell): banner1 = Unicode(default_pydev_banner, config=True,