def get_attributes(item, obj, modulename):
    """Filters attributes to be used in autosummary.
    Fixes import errors when documenting inherited attributes with autosummary.
    """
    module = import_module(modulename)
    if hasattr(getattr(module, obj), item):
        return f"~{obj}.{item}"
    else:
        return ""
Filters attributes to be used in autosummary.
    Fixes import errors when documenting inherited attributes with autosummary.
    
docs/conf.py