mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-06 16:38:48 +08:00
Fixed an issue with set literals. (The Array type was wrong before.)
This commit is contained in:
1 parent
fce715b867
commit
0567a886c4
1 file changed
+7
@@ -174,6 +174,13 @@ class Array(IterableWrapper):
|
||||
self._atom = atom
|
||||
self.type = Array.mapping[atom.children[0]]
|
||||
|
||||
c = self._atom.children
|
||||
array_node = c[1]
|
||||
if self.type == pr.Array.DICT and array_node != '}' \
|
||||
and (not hasattr(array_node, 'children')
|
||||
or ':' not in array_node.children):
|
||||
self.type = pr.Array.SET
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return helpers.FakeName(self.type, parent=self)
|
||||
|
||||
Reference in new issue
Block a user