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

Make the source of E###, W### and C901 more explicit #1922

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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