Skip to content

Commit 30db8d7

Browse files
authored
docs: Clarify docstring Warnings section usage
1 parent 09b0682 commit 30db8d7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/reference/docstrings.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,14 @@ def foo():
468468
TIP: **Warnings names are resolved using the function's scope.**
469469
`UserWarning` and other built-in warnings are resolved as such. You can document custom warnings, using the names available in the current scope, for example `my_warnings.MyCustomWarning` or `MyCustomWarning` directly, depending on what you imported/defined in the current module.
470470

471+
TIP: **Warnings section are not Warning admonitions!**
472+
To create a warning [admonition/callout][google-admonitions], use the singular form:
473+
474+
```
475+
Warning:
476+
This is a warning.
477+
```
478+
471479
#### Yields {#google-section-yields}
472480

473481
- Multiple items allowed

0 commit comments

Comments
 (0)