1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-05-11 08:19:54 +00:00

Fix methods from superclass showing under "Attributes" table

This commit is contained in:
jack1142 2020-08-22 22:26:50 +02:00 committed by GitHub
parent 9cbb801fb0
commit d9a2c0c65d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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|'):