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

It was all to easy to overlook the link to pycodestyle when it
was under the table of F### codes.
This commit is contained in:
Peter Cock 2024-03-07 15:27:01 +00:00 committed by GitHub
parent 5c52d752e6
commit 83cfcffc41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 |
@ -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