diff --git a/docs/source/conf.py b/docs/source/conf.py index 218df032..c821b2fd 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -94,7 +94,11 @@ def linkcode_resolve(domain: str, info: dict[str, str]) -> str | None: if domain != "py" or not info["module"]: return None - obj = _get_obj(info) + try: + obj = _get_obj(info) + except AttributeError: + # This can happen when trying to get a field typed at the class level. + return None file_name = _get_file_name(obj) if not file_name: