Skip to content

Commit

Permalink
Merge: Add Jedi Introspection Plugin (pull request #48)
Browse files Browse the repository at this point in the history
Fixes issue 1213
  • Loading branch information
ccordoba12 committed Dec 21, 2014
2 parents d3d55bc + ca288d5 commit 051d274
Show file tree
Hide file tree
Showing 9 changed files with 1,623 additions and 1,040 deletions.
15 changes: 8 additions & 7 deletions spyderlib/plugins/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,12 @@ def setup_page(self):
connections_label.setWordWrap(True)
editor_box = self.create_checkbox(_("Editor"), 'connect/editor')
rope_installed = programs.is_module_installed('rope')
jedi_installed = programs.is_module_installed('jedi', '>=0.8.0')
jedi_installed = programs.is_module_installed('jedi', '>=0.8.1')
editor_box.setEnabled(rope_installed or jedi_installed)
# TODO: Don't forget to add Jedi here
if not rope_installed:
rope_tip = _("This feature requires the Rope library.\n"
"It seems you don't have it installed.")
editor_box.setToolTip(rope_tip)
if not rope_installed and not jedi_installed:
editor_tip = _("This feature requires the Rope or Jedi libraries.\n"
"It seems you don't have either installed.")
editor_box.setToolTip(editor_tip)
python_box = self.create_checkbox(_("Python Console"),
'connect/python_console')
ipython_box = self.create_checkbox(_("IPython Console"),
Expand Down Expand Up @@ -412,7 +411,7 @@ def __init__(self, parent):
self.source_combo.addItems([_("Console"), _("Editor")])
self.source_combo.currentIndexChanged.connect(self.source_changed)
if (not programs.is_module_installed('rope') and
not programs.is_module_installed('jedi', '>=0.7.0')):
not programs.is_module_installed('jedi', '>=0.8.1')):
self.source_combo.hide()
source_label.hide()
layout_edit.addWidget(self.source_combo)
Expand Down Expand Up @@ -957,10 +956,12 @@ def render_sphinx_doc(self, doc, context=None):

def _on_sphinx_thread_html_ready(self, html_text):
"""Set our sphinx documentation based on thread result"""
self._sphinx_thread.wait()
self.set_rich_text_html(html_text, QUrl.fromLocalFile(CSS_PATH))

def _on_sphinx_thread_error_msg(self, error_msg):
""" Display error message on Sphinx rich text failure"""
self._sphinx_thread.wait()
self.plain_text_action.setChecked(True)
QMessageBox.critical(self,
_('Object inspector'),
Expand Down
3 changes: 2 additions & 1 deletion spyderlib/utils/introspection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"""
Introspection utilities used by Spyder
"""
from .base import get_plugin
from . import module_completion
from .plugin_manager import PluginManager

Loading

0 comments on commit 051d274

Please sign in to comment.