Reenable keyword completion.

This commit is contained in:
Dave Halter
2014-12-08 15:14:27 +01:00
parent 5cc9dd57a6
commit 01b9361b33
2 changed files with 4 additions and 2 deletions

View File

@@ -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.

View File

@@ -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