From 003789efaf6d549aca60f84a7e561567cb0a4e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Sun, 3 Apr 2022 14:56:31 +0200 Subject: [PATCH] style: Remove unnecessary condition --- src/griffe/docstrings/google.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/griffe/docstrings/google.py b/src/griffe/docstrings/google.py index 6c4fb9eb..5a70f01f 100644 --- a/src/griffe/docstrings/google.py +++ b/src/griffe/docstrings/google.py @@ -396,7 +396,7 @@ def _read_yields_section( # noqa: WPS231 name, annotation, description = match.groups() description = "\n".join([description.lstrip(), *yield_lines[1:]]).rstrip("\n") - if annotation and docstring.parent is not None: + if annotation: # try to compile the annotation to transform it into an expression annotation = parse_annotation(annotation, docstring) else: