diff options
| author | jack1142 <[email protected]> | 2020-08-22 22:26:50 +0200 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2020-12-18 21:18:55 -0500 |
| commit | ad515f7a4d58f86429d95004beaacfdbfea2343c (patch) | |
| tree | 7e29a4b7721fa0ba35507ccefdc8a73dd3f26ac4 /docs/extensions/attributetable.py | |
| parent | Fix sidebar jank on desktop. (diff) | |
| download | discord.py-ad515f7a4d58f86429d95004beaacfdbfea2343c.tar.xz discord.py-ad515f7a4d58f86429d95004beaacfdbfea2343c.zip | |
Fix methods from superclass showing under "Attributes" table
Diffstat (limited to 'docs/extensions/attributetable.py')
| -rw-r--r-- | docs/extensions/attributetable.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/extensions/attributetable.py b/docs/extensions/attributetable.py index b173edab..fde3252d 100644 --- a/docs/extensions/attributetable.py +++ b/docs/extensions/attributetable.py @@ -165,7 +165,7 @@ def process_attributetable(app, doctree, fromdocname): def get_class_results(lookup, modulename, name, fullname): module = importlib.import_module(modulename) - cls_dict = getattr(module, name).__dict__ + cls = getattr(module, name) groups = OrderedDict([ (_('Attributes'), []), @@ -183,7 +183,7 @@ def get_class_results(lookup, modulename, name, fullname): badge = None label = attr - value = cls_dict.get(attr) + value = getattr(cls, attr, None) if value is not None: doc = value.__doc__ or '' if inspect.iscoroutinefunction(value) or doc.startswith('|coro|'): |