Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checks for unconsistent returns #431

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,13 @@ This is the current list of error and warning codes:
+------------+----------------------------------------------------------------------+
| W604 | backticks are deprecated, use 'repr()' |
+------------+----------------------------------------------------------------------+
+------------+----------------------------------------------------------------------+
| **W7** | *Statement warning* |
+------------+----------------------------------------------------------------------+
| W740 (#) | inconsistent use of return (explicit) |
+------------+----------------------------------------------------------------------+
| W741 (#) | inconsistent use of return (implicit on reachable end of function) |
+------------+----------------------------------------------------------------------+


**(*)** In the default configuration, the checks **E121**, **E123**, **E126**,
Expand All @@ -418,6 +425,11 @@ closing`` to report **E133** instead of **E123**.
**(^)** These checks can be disabled at the line level using the ``# noqa``
special comment. This possibility should be reserved for special cases.

**(#)** In the default configuration, the checks **W740** and **W741** are
ignored for performance reasons. Indeed, they rely on an AST tree to be
built which is a a slower operation.


*Special cases aren't special enough to break the rules.*


Expand Down
Loading