1
0
forked from VimPlug/jedi

Implement the new parser in jedi.parser.Parser

This commit is contained in:
Dave Halter
2014-10-10 00:06:28 +02:00
parent 05fd7f992e
commit 66840a742c
3 changed files with 31 additions and 9 deletions

View File

@@ -558,17 +558,21 @@ class Class(Scope):
:param start_pos: The start position (line, column) of the class.
:type start_pos: tuple(int, int)
"""
__slots__ = ('name', 'supers', 'decorators')
__slots__ = ('decorators')
def __init__(self, module, name, supers, start_pos):
super(Class, self).__init__(module, start_pos)
self.name = name
name.parent = self.use_as_parent
self.supers = supers
for s in self.supers:
s.parent = self.use_as_parent
def __init__(self, children):
super(Class, self).__init__(children)
self.decorators = []
@property
def supers(self):
raise NotImplementedError
@property
def name(self):
return self.children[1] # First token after `def`
@property
def doc(self):
"""