From 01b9361b33b59f9aa19911869325e051f961b1d3 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 8 Dec 2014 15:14:27 +0100 Subject: [PATCH] Reenable keyword completion. --- jedi/api/__init__.py | 3 +-- jedi/parser/tree.py | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jedi/api/__init__.py b/jedi/api/__init__.py index b04e947b..d2aa7dda 100644 --- a/jedi/api/__init__.py +++ b/jedi/api/__init__.py @@ -188,8 +188,7 @@ class Script(object): if not path and not isinstance(user_stmt, pr.Import): # add keywords - #completions += ((k, b) for k in keywords.keyword_names(all=True)) - pass + completions += ((k, b) for k in keywords.keyword_names(all=True)) # TODO delete? We should search for valid parser # transformations. diff --git a/jedi/parser/tree.py b/jedi/parser/tree.py index 6d982f43..ebc87bff 100644 --- a/jedi/parser/tree.py +++ b/jedi/parser/tree.py @@ -1246,6 +1246,9 @@ class Param(Base): A helper class for functions. Read only. """ __slots__ = ('tfpdef', 'default', 'stars', 'parent') + # Even though it's not not an official node, just give it one, because that + # makes checking more consistent. + type = 'param' def __init__(self, tfpdef, parent, default=None, stars=0): self.tfpdef = tfpdef # tfpdef: see grammar.txt