Skip to content

Commit 70e544b

Browse files
Update --no-warn-no-return docs for empty body changes (#14065)
Fixes #14048 Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent a48dd5a commit 70e544b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/source/command_line.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,9 +448,10 @@ potentially problematic or redundant in some way.
448448
are when:
449449

450450
- The function has a ``None`` or ``Any`` return type
451-
- The function has an empty body or a body that is just
452-
ellipsis (``...``). Empty functions are often used for
453-
abstract methods.
451+
- The function has an empty body and is marked as an abstract method,
452+
is in a protocol class, or is in a stub file
453+
- The execution path can never return; for example, if an exception
454+
is always raised
454455

455456
Passing in :option:`--no-warn-no-return` will disable these error
456457
messages in all cases.

0 commit comments

Comments
 (0)