From 55d40e22b332ac744ecf63353804979ecda0d05e Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 31 May 2019 17:54:21 +0200 Subject: [PATCH] Apparently numpydoc can fail with numpydoc.docscrape.ParseError as well, just ignore all exceptions --- jedi/evaluate/docstrings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jedi/evaluate/docstrings.py b/jedi/evaluate/docstrings.py index 8d2df039..3aa216fa 100644 --- a/jedi/evaluate/docstrings.py +++ b/jedi/evaluate/docstrings.py @@ -64,7 +64,7 @@ def _search_param_in_numpydocstr(docstr, param_str): # This is a non-public API. If it ever changes we should be # prepared and return gracefully. params = _get_numpy_doc_string_cls()(docstr)._parsed_data['Parameters'] - except (KeyError, AttributeError, ImportError, SyntaxError): + except Exception: return [] for p_name, p_type, p_descr in params: if p_name == param_str: @@ -88,7 +88,7 @@ def _search_return_in_numpydocstr(docstr): # prepared and return gracefully. returns = doc._parsed_data['Returns'] returns += doc._parsed_data['Yields'] - except (KeyError, AttributeError): + except Exception: return for r_name, r_type, r_descr in returns: # Return names are optional and if so the type is in the name