-
-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
Using mkdocstrings-python 1.5.2 w/ griffe 0.35, we noticed that suddenly inherited members
started showing up in our API docs although we did not ask for them. They show up even
when explicitly turned off.
Our code is internal, so I cannot share it, but I did some poking into do_filter_objects
and found that the offending members are aliases whose target is inherited. This hack
in do_filter_objects
appears to mimic the old behavior:
if members_list is True:
# Return all pre-selected members.
return objects
# HACK - remove inherited aliases
from griffe.dataclasses import Alias
for i in reversed(range(len(objects))):
obj = objects[i]
if isinstance(obj,Alias):
assert not obj.inherited
if obj.target.inherited:
objects.pop(i)
Hope that is enough to go on....
Metadata
Metadata
Assignees
Labels
No labels