From 68635fc80c4773c2dee0b7f98a3ba35f18ad53ee Mon Sep 17 00:00:00 2001 From: David Halter Date: Tue, 23 Jul 2013 15:36:53 +0200 Subject: [PATCH] fix empty return statement docstrings --- jedi/docstrings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jedi/docstrings.py b/jedi/docstrings.py index 611086f3..30c037cf 100644 --- a/jedi/docstrings.py +++ b/jedi/docstrings.py @@ -125,5 +125,7 @@ def find_return_types(func): return [] p = parsing.Parser(type_str, None, (1, 0), no_docstr=True) + if p.user_stmt is None: + return [] p.user_stmt.parent = func return list(evaluate.follow_statement(p.user_stmt))