From 948b72d27f3aba90a4b9582a89f4ae84a281211a Mon Sep 17 00:00:00 2001 From: David Halter Date: Fri, 2 Nov 2012 17:01:33 +0100 Subject: [PATCH] fix for #51 --- jedi/parsing.py | 3 ++- test/completion/functions.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/jedi/parsing.py b/jedi/parsing.py index 162754b4..ce0ea63c 100644 --- a/jedi/parsing.py +++ b/jedi/parsing.py @@ -802,7 +802,8 @@ class Statement(Simple): while is_call_or_close(): result = result.parent() close_brackets = False - result.add_to_current_field(tok) + if tok != '\n': + result.add_to_current_field(tok) if level != 0: debug.warning("Brackets don't match: %s." diff --git a/test/completion/functions.py b/test/completion/functions.py index 83cb5376..c44560c5 100644 --- a/test/completion/functions.py +++ b/test/completion/functions.py @@ -188,6 +188,11 @@ exe['b'] #? int() float() exe['c'] +exe2 = kwargs_func(**{a:3, + b:4.0}) +#? int() +exe2['a'] + # ----------------- # *args / ** kwargs # -----------------