summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-03-07 16:52:41 +0100
committerMarc Mueller <30130371+cdce8p@users.noreply.github.com>2021-03-07 16:52:41 +0100
commit2a6ed746fbc3bb93b44f2c9f4172bbcc5b8986bd (patch)
treea438edc77c81952e24f7a19f2eb0688d6b4a4387
parenta5eaaee61cd63ccbacc45277ee3ac1fd2857f407 (diff)
downloadastroid-git-2a6ed746fbc3bb93b44f2c9f4172bbcc5b8986bd.tar.gz
Check if keywords is not None before iterating over it
-rw-r--r--astroid/scoped_nodes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/astroid/scoped_nodes.py b/astroid/scoped_nodes.py
index 1a7c7478..41aa9e1b 100644
--- a/astroid/scoped_nodes.py
+++ b/astroid/scoped_nodes.py
@@ -2920,7 +2920,8 @@ class ClassDef(mixins.FilterStmtsMixin, LocalsDictNodeNG, node_classes.Statement
yield self.decorators
yield from self.bases
- yield from self.keywords
+ if self.keywords is not None:
+ yield from self.keywords
yield from self.body
@decorators_mod.cached