mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-16 02:27:06 +08:00
Fixed an issue with set literals. (The Array type was wrong before.)
This commit is contained in:
@@ -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