Skip to content

Commit

Permalink
Update --no-warn-no-return docs for empty body changes (#14065)
Browse files Browse the repository at this point in the history
Fixes #14048

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
hauntsaninja and JelleZijlstra committed Nov 11, 2022
1 parent b9daa31 commit 1650ae0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/source/command_line.rst
Expand Up @@ -448,9 +448,10 @@ potentially problematic or redundant in some way.
are when:

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

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

0 comments on commit 1650ae0

Please sign in to comment.