From 15587eeef11c8e31ee1c3bd2886eb844dd98b09a Mon Sep 17 00:00:00 2001 From: jack1142 <6032823+jack1142@users.noreply.github.com> Date: Sun, 30 Aug 2020 04:22:45 +0200 Subject: [PATCH] Another take at fixing methods showing up under "Attributes" --- docs/extensions/attributetable.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/extensions/attributetable.py b/docs/extensions/attributetable.py index fde3252de..9af839817 100644 --- a/docs/extensions/attributetable.py +++ b/docs/extensions/attributetable.py @@ -183,7 +183,11 @@ def get_class_results(lookup, modulename, name, fullname): badge = None label = attr - value = getattr(cls, attr, None) + for base in cls.__mro__: + value = base.__dict__.get(attr) + if value is not None: + break + if value is not None: doc = value.__doc__ or '' if inspect.iscoroutinefunction(value) or doc.startswith('|coro|'):