mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
fixed numpy bugs, that made it impossible to use complete numpy (including regression tests)
This commit is contained in:
@@ -90,7 +90,9 @@ class Parser(CachedModule):
|
|||||||
@property
|
@property
|
||||||
def module(self):
|
def module(self):
|
||||||
if not self._module:
|
if not self._module:
|
||||||
self.sys_path.insert(0, self.path)
|
if self.path:
|
||||||
|
dir = os.path.dirname(self.path)
|
||||||
|
self.sys_path.insert(0, dir)
|
||||||
|
|
||||||
temp, sys.path = sys.path, self.sys_path
|
temp, sys.path = sys.path, self.sys_path
|
||||||
# TODO reenable and check (stackoverflow question - pylab builtins)
|
# TODO reenable and check (stackoverflow question - pylab builtins)
|
||||||
@@ -99,7 +101,9 @@ class Parser(CachedModule):
|
|||||||
|
|
||||||
self.sys_path, sys.path = sys.path, temp
|
self.sys_path, sys.path = sys.path, temp
|
||||||
|
|
||||||
self.sys_path.pop(0)
|
if self.path:
|
||||||
|
self.sys_path.pop(0)
|
||||||
|
|
||||||
self._module = self._content['module']
|
self._module = self._content['module']
|
||||||
#print 'mod', self._content['module']
|
#print 'mod', self._content['module']
|
||||||
return self._module
|
return self._module
|
||||||
|
|||||||
10
test/completion/thirdparty/pylab.py
vendored
Normal file
10
test/completion/thirdparty/pylab.py
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import pylab
|
||||||
|
pylab.
|
||||||
|
|
||||||
|
import numpy
|
||||||
|
|
||||||
|
#? ['array2string']
|
||||||
|
numpy.array2string
|
||||||
|
|
||||||
|
#? ['shape']
|
||||||
|
numpy.matrix().shape
|
||||||
Reference in New Issue
Block a user