Skip to content

Commit

Permalink
Address get_object_members() incompatibility with Sphinx v8
Browse files Browse the repository at this point in the history
Closes #428
  • Loading branch information
AWhetter committed Jun 22, 2024
1 parent 83560ba commit 52043a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions autoapi/documenters.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,19 @@ def process_doc(self, docstrings):
yield ""

def get_object_members(self, want_all):
children = ((child.name, child) for child in self.object.children)
children = (
autodoc.ObjectMember(child.name, child) for child in self.object.children
)

if not want_all:
if not self.options.members:
return False, []

children = (child for child in children if child[0] in self.options.members)
children = (
child for child in children if child.__name__ in self.options.members
)
elif not self.options.inherited_members:
children = (child for child in children if not child[1].inherited)
children = (child for child in children if not child.object.inherited)

return False, children

Expand Down
1 change: 1 addition & 0 deletions docs/changes/428.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Address get_object_members() incompatibility with Sphinx v8

0 comments on commit 52043a8

Please sign in to comment.