diff options
| author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-03-06 01:15:49 +0100 |
|---|---|---|
| committer | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-03-07 16:12:54 +0100 |
| commit | a5eaaee61cd63ccbacc45277ee3ac1fd2857f407 (patch) | |
| tree | e587696908fa8e2a8776c31ee67f7438c0ad7bce | |
| parent | 45aac900a250dcc7b06d3ea0a66dee1a86377a84 (diff) | |
| download | astroid-git-a5eaaee61cd63ccbacc45277ee3ac1fd2857f407.tar.gz | |
Iterate over Keywords when using ClassDef.get_children
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | astroid/scoped_nodes.py | 3 |
2 files changed, 6 insertions, 1 deletions
@@ -15,6 +15,10 @@ Release Date: TBA Closes PyCQA/pylint#3974 +* Iterate over ``Keywords`` when using ``ClassDef.get_children`` + + Closes PyCQA/pylint#3202 + What's New in astroid 2.5.1? ============================ diff --git a/astroid/scoped_nodes.py b/astroid/scoped_nodes.py index 4c84c516..1a7c7478 100644 --- a/astroid/scoped_nodes.py +++ b/astroid/scoped_nodes.py @@ -1895,7 +1895,7 @@ class ClassDef(mixins.FilterStmtsMixin, LocalsDictNodeNG, node_classes.Statement # by a raw factories # a dictionary of class instances attributes - _astroid_fields = ("decorators", "bases", "body") # name + _astroid_fields = ("decorators", "bases", "keywords", "body") # name decorators = None """The decorators that are applied to this class. @@ -2920,6 +2920,7 @@ class ClassDef(mixins.FilterStmtsMixin, LocalsDictNodeNG, node_classes.Statement yield self.decorators yield from self.bases + yield from self.keywords yield from self.body @decorators_mod.cached |
