diff --git a/docs/source/conf.py b/docs/source/conf.py index 50b1ad717e4b3..4a1a5fb455ff3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -136,7 +136,8 @@ def linkcode_resolve(domain, info): for part in info['fullname'].split('.'): obj = getattr(obj, part) - if not inspect.isclass(obj) and not inspect.isfunction(obj) and not inspect.ismethod(obj): + if not (inspect.isclass(obj) or inspect.isfunction(obj) + or inspect.ismethod(obj)): obj = obj.__class__ # Get the class of the instance lineno = inspect.getsourcelines(obj)[1]