forked from VimPlug/jedi
Fix types tests.
This commit is contained in:
@@ -220,7 +220,8 @@ class Evaluator(object):
|
|||||||
else:
|
else:
|
||||||
c = atom.children
|
c = atom.children
|
||||||
# Parentheses without commas are not tuples.
|
# Parentheses without commas are not tuples.
|
||||||
if c[0] == '(' and not (pr.is_node(c[1], 'testlist_comp')
|
if c[0] == '(' and not len(c) == 2 \
|
||||||
|
and not(pr.is_node(c[1], 'testlist_comp')
|
||||||
and len(c[1].children) > 1):
|
and len(c[1].children) > 1):
|
||||||
return self.eval_element(c[1])
|
return self.eval_element(c[1])
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ class Array(IterableWrapper):
|
|||||||
It returns e.g. for a list: append, pop, ...
|
It returns e.g. for a list: append, pop, ...
|
||||||
"""
|
"""
|
||||||
# `array.type` is a string with the type, e.g. 'list'.
|
# `array.type` is a string with the type, e.g. 'list'.
|
||||||
scope = self._evaluator.find_types(compiled.builtin, self._array.type)[0]
|
scope = self._evaluator.find_types(compiled.builtin, self.type)[0]
|
||||||
scope = self._evaluator.execute(scope)[0] # builtins only have one class
|
scope = self._evaluator.execute(scope)[0] # builtins only have one class
|
||||||
from jedi.evaluate.representation import get_instance_el
|
from jedi.evaluate.representation import get_instance_el
|
||||||
for _, names in scope.scope_names_generator():
|
for _, names in scope.scope_names_generator():
|
||||||
|
|||||||
Reference in New Issue
Block a user