Skip to content

Commit

Permalink
Iterate over Keywords when using ClassDef.get_children
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Mar 7, 2021
1 parent 45aac90 commit a5eaaee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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?
============================
Expand Down
3 changes: 2 additions & 1 deletion astroid/scoped_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1895,7 +1895,7 @@ def my_meth(self, arg):
# 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.
Expand Down Expand Up @@ -2920,6 +2920,7 @@ def get_children(self):
yield self.decorators

yield from self.bases
yield from self.keywords
yield from self.body

@decorators_mod.cached
Expand Down

0 comments on commit a5eaaee

Please sign in to comment.