summaryrefslogtreecommitdiff
path: root/astroid
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-09-17 22:45:37 +0200
committerGitHub <noreply@github.com>2021-09-17 22:45:37 +0200
commit7eedd68ffdee0f6161dc37aab083a2d5ab040182 (patch)
treeb53ec65e4b6c51df2cd50c666ddcd0313d257797 /astroid
parent28411ee8575562b7d7d1d0639d4e61f91ed1586b (diff)
downloadastroid-git-7eedd68ffdee0f6161dc37aab083a2d5ab040182.tar.gz
Fix regression on ClassDef inference (#1181)
Diffstat (limited to 'astroid')
-rw-r--r--astroid/nodes/scoped_nodes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/astroid/nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes.py
index 025cd845..e64f736e 100644
--- a/astroid/nodes/scoped_nodes.py
+++ b/astroid/nodes/scoped_nodes.py
@@ -2096,7 +2096,8 @@ class ClassDef(mixins.FilterStmtsMixin, LocalsDictNodeNG, node_classes.Statement
:param keywords: The keywords given to the class definition.
:type keywords: list(Keyword) or None
"""
- self.keywords = keywords
+ if keywords is not None:
+ self.keywords = keywords
self.bases = bases
self.body = body
self.decorators = decorators