diff --git a/jedi/evaluate/analysis.py b/jedi/evaluate/analysis.py index 751f09d9..1a8d13f1 100644 --- a/jedi/evaluate/analysis.py +++ b/jedi/evaluate/analysis.py @@ -153,7 +153,7 @@ def _check_for_exception_catch(node_context, jedi_name, exception, payload=None) and not (branch_type.start_pos < jedi_name.start_pos <= suite.end_pos): return False - for node in obj.get_except_clauses(): + for node in obj.get_except_clause_tests(): if node is None: return True # An exception block that catches everything. else: diff --git a/jedi/parser/python/tree.py b/jedi/parser/python/tree.py index 16e647c3..25bbccdd 100644 --- a/jedi/parser/python/tree.py +++ b/jedi/parser/python/tree.py @@ -741,7 +741,7 @@ class TryStmt(Flow): type = 'try_stmt' __slots__ = () - def get_except_clauses(self): + def get_except_clause_tests(self): """ Returns the ``test`` nodes found in ``except_clause`` nodes. Returns ``[None]`` for except clauses without an exception given.