From 83cfcffc418f56b6100fc1821de5f1d1c9fa05f2 Mon Sep 17 00:00:00 2001
From: Peter Cock
Date: Thu, 7 Mar 2024 15:27:01 +0000
Subject: [PATCH] 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.
---
docs/source/user/error-codes.rst | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/docs/source/user/error-codes.rst b/docs/source/user/error-codes.rst
index 2a91413..abc5e4a 100644
--- a/docs/source/user/error-codes.rst
+++ b/docs/source/user/error-codes.rst
@@ -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