Some objects don't have a module

This commit is contained in:
Jacob Bom 2017-06-07 12:52:36 +02:00
parent 87b096c7f9
commit 92183a5bbc

View file

@ -295,9 +295,12 @@ import inspect
def autodoc_skip_member(app, what, name, obj, skip, options):
if inspect.getmodule(obj).__name__.startswith('telegram') and inspect.isfunction(obj):
if name.lower() != name:
return True
try:
if inspect.getmodule(obj).__name__.startswith('telegram') and inspect.isfunction(obj):
if name.lower() != name:
return True
except AttributeError:
pass
# Return None so napoleon can handle it