From 72bcccc19ea6a4896473dad9d22f61e7893a1a62 Mon Sep 17 00:00:00 2001 From: Derek Gustafson Date: Sun, 22 Jan 2017 07:31:15 -0500 Subject: Make ClassDefs support keyword arguments. (#384) --- astroid/tree/scoped_nodes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'astroid/tree/scoped_nodes.py') diff --git a/astroid/tree/scoped_nodes.py b/astroid/tree/scoped_nodes.py index e9c6a26d..257b13d9 100644 --- a/astroid/tree/scoped_nodes.py +++ b/astroid/tree/scoped_nodes.py @@ -1224,7 +1224,8 @@ class ClassDef(QualifiedNameMixin, base.FilterStmtsMixin, _newstyle = None def __init__(self, name=None, doc=None, lineno=None, - col_offset=None, parent=None): + col_offset=None, parent=None, keywords=None): + self.keywords = keywords self.bases = [] self.body = [] self.name = name @@ -1233,7 +1234,9 @@ class ClassDef(QualifiedNameMixin, base.FilterStmtsMixin, self.external_attrs = collections.defaultdict(list) super(ClassDef, self).__init__(lineno, col_offset, parent) - def postinit(self, bases, body, decorators, newstyle=None, metaclass=None): + # pylint: disable=redefined-outer-name + def postinit(self, bases, body, decorators, newstyle=None, metaclass=None, keywords=None): + self.keywords = keywords self.bases = bases self.body = body self.decorators = decorators -- cgit v1.2.1