diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index 73c2187b..ddd42f4c 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -618,9 +618,8 @@ class Script(object): if i.is_nested() and any(not isinstance(i, pr.Module) for i in iw): analysis.add(self._evaluator, 'import-error', i.namespace_names[-1]) for stmt in sorted(stmts, key=lambda obj: obj.start_pos): - if not (isinstance(stmt.parent, pr.ForFlow) - and stmt.parent.set_stmt == stmt): - self._evaluator.eval_statement(stmt) + #if not (isinstance(stmt.parent, pr.ForFlow) and stmt.parent.set_stmt == stmt): + self._evaluator.eval_statement(stmt) ana = [a for a in self._evaluator.analysis if self.path == a.path] return sorted(set(ana), key=lambda x: x.line) diff --git a/jedi/evaluate/analysis.py b/jedi/evaluate/analysis.py index a08f6eec..54d34732 100644 --- a/jedi/evaluate/analysis.py +++ b/jedi/evaluate/analysis.py @@ -74,7 +74,7 @@ class Warning(Error): def add(evaluator, name, jedi_obj, message=None, typ=Error, payload=None): exception = CODES[name][1] - if True or _check_for_exception_catch(evaluator, jedi_obj, exception, payload): + if _check_for_exception_catch(evaluator, jedi_obj, exception, payload): return module_path = jedi_obj.get_parent_until().path @@ -208,14 +208,6 @@ def get_module_statements(module): if stmt is None: continue - for expression in stmt.expression_list(): - if isinstance(expression, pr.Array): - new |= add_stmts(expression.values) - - if isinstance(expression, pr.StatementElement): - for element in expression.generate_call_path(): - if isinstance(element, pr.Array): - new |= add_stmts(element.values) new.add(stmt) return new