~ubuntu-branches/debian/experimental/spyder/experimental

« back to all changes in this revision

Viewing changes to spyderlib/utils/introspection/plugin_manager.py

  • Committer: Package Import Robot
  • Author(s): Picca Frédéric-Emmanuel
  • Date: 2015-03-28 09:12:38 UTC
  • mfrom: (1.1.24)
  • Revision ID: package-import@ubuntu.com-20150328091238-1j3fxmiq39uh26ao
Tags: 2.3.4+dfsg1-1~exp1
* Imported Upstream version 2.3.4+dfsg1
* Updated the copyright file

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
#
 
3
# Copyright © 2015 The Spyder development team
 
4
# Licensed under the terms of the MIT License
 
5
# (see spyderlib/__init__.py for details)
 
6
 
1
7
from __future__ import print_function
 
8
 
2
9
import re
3
10
from collections import OrderedDict
4
11
import functools
17
24
from spyderlib.qt.QtCore import Signal, QThread, QObject, QTimer
18
25
 
19
26
 
20
 
PLUGINS = ['jedi', 'rope', 'fallback']
 
27
PLUGINS = ['rope', 'jedi', 'fallback']
21
28
 
22
29
LOG_FILENAME = get_conf_path('introspection.log')
23
30
DEBUG_EDITOR = DEBUG >= 3
55
62
        self.waiting = False
56
63
 
57
64
    def _handle_incoming(self, name):
 
65
        # coerce to a str in case it is a QString
 
66
        name = str(name)
58
67
        self._threads[name].wait()
59
68
        if self.result:
60
69
            return
66
75
 
67
76
    def _make_async_call(self, plugin, info):
68
77
        """Trigger an introspection job in a thread"""
69
 
        self._threads[plugin.name] = thread = IntrospectionThread(plugin, info)
 
78
        self._threads[str(plugin.name)] = thread = IntrospectionThread(plugin, info)
70
79
        thread.request_handled.connect(self._handle_incoming)
71
80
        thread.start()
72
81
 
399
408
                                     at_position=prev_info.position)
400
409
 
401
410
        if resp['name']:
402
 
            if not resp['docstring']:
403
 
                resp['docstring'] = '<no docstring>'
404
 
 
405
411
            self.send_to_inspector.emit(
406
412
                resp['name'], resp['argspec'],
407
413
                resp['note'], resp['docstring'],