Skip to content

Commit

Permalink
Make the source of E###, W### and C901 more explicit
Browse files Browse the repository at this point in the history
It was all to easy to overlook the link to pycodestyle when it
was under the table of F### codes.
  • Loading branch information
peterjc committed Mar 7, 2024
1 parent 5c52d75 commit 83cfcff
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions docs/source/user/error-codes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@ Flake8 and its plugins assign a code to each message that we refer to as an
:term:`error code` (or :term:`violation`). Most plugins will list their error
codes in their documentation or README.

Flake8 installs ``pycodestyle``, ``pyflakes``, and ``mccabe`` by default and
generates its own :term:`error code`\ s for ``pyflakes``:
Flake8 installs ``pycodestyle``, ``pyflakes``, and ``mccabe`` by default.

Codes from ``pycodestyle`` start with ``E`` (error) or ``W`` (warning), see
`pycodestyle's list of error codes`_.

``mccabe`` only ever reports one :term:`violation` - ``C901`` based on the
complexity value provided by the user.

Flake8 generates its own :term:`error code`\ s for ``pyflakes``:

+------+---------------------------------------------------------------------+
| Code | Example Message |
Expand Down Expand Up @@ -113,12 +120,6 @@ generates its own :term:`error code`\ s for ``pyflakes``:
We also report one extra error: ``E999``. We report ``E999`` when we fail to
compile a file into an Abstract Syntax Tree for the plugins that require it.

``mccabe`` only ever reports one :term:`violation` - ``C901`` based on the
complexity value provided by the user.

Users should also reference `pycodestyle's list of error codes`_.


.. links
.. _pycodestyle's list of error codes:
https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes

0 comments on commit 83cfcff

Please sign in to comment.