forked from VimPlug/jedi
improve the hack (still not passing tests)
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import copy
|
||||||
|
|
||||||
from jedi._compatibility import hasattr, unicode, u
|
from jedi._compatibility import hasattr, unicode, u
|
||||||
from jedi.parser import representation as pr
|
from jedi.parser import representation as pr
|
||||||
from jedi import debug
|
from jedi import debug
|
||||||
@@ -309,11 +311,10 @@ class NameFinder(object):
|
|||||||
|
|
||||||
if not result and isinstance(self.scope, er.Instance):
|
if not result and isinstance(self.scope, er.Instance):
|
||||||
# __getattr__ / __getattribute__
|
# __getattr__ / __getattribute__
|
||||||
class FuckingHack():
|
for r in self._check_getattr(self.scope):
|
||||||
line_offset = 0
|
new_name = copy.copy(r.name)
|
||||||
p = 0, 0
|
new_name.parent = r
|
||||||
result += [pr.Name(FuckingHack(), [(str(r.name), p)], p, p, r)
|
result.append(new_name)
|
||||||
for r in self._check_getattr(self.scope)]
|
|
||||||
|
|
||||||
debug.dbg('sfn filter "%s" in (%s-%s): %s@%s'
|
debug.dbg('sfn filter "%s" in (%s-%s): %s@%s'
|
||||||
% (self.name_str, self.scope, nscope, u(result), self.position))
|
% (self.name_str, self.scope, nscope, u(result), self.position))
|
||||||
|
|||||||
Reference in New Issue
Block a user