mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-20 04:21:13 +08:00
LazyContext.infer() should return a set.
This commit is contained in:
@@ -98,7 +98,7 @@ class AbstractLazyContext(object):
|
||||
class LazyKnownContext(AbstractLazyContext):
|
||||
"""data is a context."""
|
||||
def infer(self):
|
||||
yield self.data
|
||||
return set([self.data])
|
||||
|
||||
|
||||
class LazyKnownContexts(AbstractLazyContext):
|
||||
|
||||
@@ -108,7 +108,7 @@ for c in Counter(3, 8):
|
||||
|
||||
|
||||
# -----------------
|
||||
# tuples
|
||||
# tuple assignments
|
||||
# -----------------
|
||||
def gen():
|
||||
if random.choice([0,1]):
|
||||
@@ -148,6 +148,9 @@ a
|
||||
#? str()
|
||||
b
|
||||
|
||||
a, = (a for a in [1])
|
||||
#? int()
|
||||
a
|
||||
|
||||
# -----------------
|
||||
# More complicated access
|
||||
|
||||
Reference in New Issue
Block a user