We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41921c5 commit 8c9f803Copy full SHA for 8c9f803
1 file changed
src/griffe/_internal/docstrings/sphinx.py
@@ -366,6 +366,7 @@ def _read_return(
366
offset: int,
367
parsed_values: _ParsedValues,
368
*,
369
+ warn_missing_types: bool = True,
370
warnings: bool = True,
371
**options: Any, # noqa: ARG001
372
) -> int:
@@ -384,7 +385,7 @@ def _read_return(
384
385
try:
386
annotation = docstring.parent.annotation # type: ignore[union-attr]
387
except AttributeError:
- if warnings:
388
+ if warnings and warn_missing_types:
389
docstring_warning(docstring, 0, f"No return type or annotation at '{parsed_directive.line}'")
390
annotation = None
391
0 commit comments