forked from VimPlug/jedi
testing should now work without duplicates
This commit is contained in:
@@ -340,7 +340,7 @@ class Script(object):
|
|||||||
else:
|
else:
|
||||||
names.append(dynamic.RelatedName(d.names[0], d))
|
names.append(dynamic.RelatedName(d.names[0], d))
|
||||||
|
|
||||||
return sorted(names, key=lambda x: (x.module_path, x.start_pos))
|
return sorted(set(names), key=lambda x: (x.module_path, x.start_pos))
|
||||||
|
|
||||||
def get_in_function_call(self):
|
def get_in_function_call(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -449,3 +449,10 @@ class RelatedName(BaseOutput):
|
|||||||
@property
|
@property
|
||||||
def description(self):
|
def description(self):
|
||||||
return "%s@%s,%s" % (self.text, self.start_pos[0], self.start_pos[1])
|
return "%s@%s,%s" % (self.text, self.start_pos[0], self.start_pos[1])
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
return self.start_pos == other.start_pos \
|
||||||
|
and self.module_path == other.module_path
|
||||||
|
|
||||||
|
def __hash__(self):
|
||||||
|
return hash((self.start_pos, self.module_path))
|
||||||
|
|||||||
@@ -71,10 +71,10 @@ module_not_exists
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#< (85,17), (75,24), (78,0), (81,17), (4,5)
|
#< (1,0), (85,17), (75,24), (78,0), (81,17), (4,5)
|
||||||
from import_tree import rename1
|
from import_tree import rename1
|
||||||
|
|
||||||
#< (78,8), (3,0), (4,20), (6,0), (81,32), (82,0), (6,0)
|
#< (78,8), (3,0), (4,20), (6,0), (81,32), (82,0)
|
||||||
rename1.abc
|
rename1.abc
|
||||||
|
|
||||||
#< (78,8), (3,0), (4,20), (6,0), (81,32), (82,0)
|
#< (78,8), (3,0), (4,20), (6,0), (81,32), (82,0)
|
||||||
|
|||||||
Reference in New Issue
Block a user