forked from VimPlug/jedi
Now most decorator tests pass.
This commit is contained in:
@@ -473,7 +473,7 @@ class Function(use_metaclass(CachedMetaClass, Wrapper)):
|
|||||||
if trailer:
|
if trailer:
|
||||||
# Create a trailer and evaluate it.
|
# Create a trailer and evaluate it.
|
||||||
trailer = pr.Node(python_symbols.trailer, trailer)
|
trailer = pr.Node(python_symbols.trailer, trailer)
|
||||||
dec_results = self._evaluator.eval_trailer(trailer)
|
dec_results = self._evaluator.eval_trailer(dec_results, trailer)
|
||||||
|
|
||||||
if not len(dec_results):
|
if not len(dec_results):
|
||||||
debug.warning('decorator not found: %s on %s', dec, self.base_func)
|
debug.warning('decorator not found: %s on %s', dec, self.base_func)
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ class Scope(Simple, DocstringMixin):
|
|||||||
if isinstance(s, (ExprStmt, Import))])
|
if isinstance(s, (ExprStmt, Import))])
|
||||||
elif isinstance(c, (Function, Class)):
|
elif isinstance(c, (Function, Class)):
|
||||||
names.append(c.name)
|
names.append(c.name)
|
||||||
elif isinstance(c, Flow) or is_node(c, 'suite'):
|
elif isinstance(c, Flow) or is_node(c, 'suite', 'decorated'):
|
||||||
names += scan(c.children)
|
names += scan(c.children)
|
||||||
return names
|
return names
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user