diff --git a/src/_griffe/docstrings/google.py b/src/_griffe/docstrings/google.py index 3b04fd4d..2b89823f 100644 --- a/src/_griffe/docstrings/google.py +++ b/src/_griffe/docstrings/google.py @@ -519,7 +519,7 @@ def _read_yields_section( annotation = parse_docstring_annotation(annotation, docstring) else: # try to retrieve the annotation from the docstring parent - with suppress(AttributeError, KeyError, ValueError): + with suppress(AttributeError, IndexError, KeyError, ValueError): annotation = docstring.parent.returns # type: ignore[union-attr] if annotation.is_iterator: yield_item = annotation.slice