From fd50146f9277ea7e5f1cc346c03a676ce08f093d Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Thu, 16 Mar 2017 20:20:58 +0100 Subject: [PATCH] Simple cleanup. --- jedi/parser/python/tree.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/jedi/parser/python/tree.py b/jedi/parser/python/tree.py index 942e271b..6ab2c139 100644 --- a/jedi/parser/python/tree.py +++ b/jedi/parser/python/tree.py @@ -207,10 +207,13 @@ class PythonMixin(): class PythonLeaf(Leaf, PythonMixin): - pass + __slots__ = () class _LeafWithoutNewlines(PythonLeaf): + """ + Simply here to optimize performance. + """ __slots__ = () @property @@ -218,20 +221,21 @@ class _LeafWithoutNewlines(PythonLeaf): return self.line, self.indent + len(self.value) +# Python base classes class PythonBaseNode(BaseNode, PythonMixin): - pass - - -class PythonErrorNode(ErrorNode, PythonMixin): - pass - - -class PythonErrorLeaf(ErrorLeaf, PythonMixin): - pass + __slots__ = () class PythonNode(Node, PythonMixin): - pass + __slots__ = () + + +class PythonErrorNode(ErrorNode, PythonMixin): + __slots__ = () + + +class PythonErrorLeaf(ErrorLeaf, PythonMixin): + __slots__ = () class EndMarker(_LeafWithoutNewlines):