Skip to content

Commit

Permalink
fix: Fix parsing Yields section (Google-style) when yielded values ar…
Browse files Browse the repository at this point in the history
…e tuples, and the description has more lines than tuple values
  • Loading branch information
pawamoy committed Aug 9, 2024
1 parent 727f99b commit 9091776
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_griffe/docstrings/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9091776

Please sign in to comment.