mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 20:46:54 +00:00
Move old documentation out of the way
This commit is contained in:
parent
0f2a2614ee
commit
55cc996368
11 changed files with 0 additions and 0 deletions
|
|
@ -1,51 +0,0 @@
|
|||
.. _error-codes:
|
||||
|
||||
Warning / Error codes
|
||||
=====================
|
||||
|
||||
The convention of Flake8 is to assign a code to each error or warning, like
|
||||
the ``pep8`` tool. These codes are used to configure the list of errors
|
||||
which are selected or ignored.
|
||||
|
||||
Each code consists of an upper case ASCII letter followed by three digits.
|
||||
The recommendation is to use a different prefix for each plugin. A list of the
|
||||
known prefixes is published below:
|
||||
|
||||
- ``E***``/``W***``: `pep8 errors and warnings
|
||||
<http://pep8.readthedocs.org/en/latest/intro.html#error-codes>`_
|
||||
- ``F***``: PyFlakes codes (see below)
|
||||
- ``C9**``: McCabe complexity plugin `mccabe
|
||||
<https://github.com/flintwork/mccabe>`_
|
||||
- ``N8**``: Naming Conventions plugin `pep8-naming
|
||||
<https://github.com/flintwork/pep8-naming>`_
|
||||
|
||||
|
||||
The original PyFlakes does not provide error codes. Flake8 patches the
|
||||
PyFlakes messages to add the following codes:
|
||||
|
||||
+------+--------------------------------------------------------------------+
|
||||
| code | sample message |
|
||||
+======+====================================================================+
|
||||
| F401 | ``module`` imported but unused |
|
||||
+------+--------------------------------------------------------------------+
|
||||
| F402 | import ``module`` from line ``N`` shadowed by loop variable |
|
||||
+------+--------------------------------------------------------------------+
|
||||
| F403 | 'from ``module`` import \*' used; unable to detect undefined names |
|
||||
+------+--------------------------------------------------------------------+
|
||||
| F404 | future import(s) ``name`` after other statements |
|
||||
+------+--------------------------------------------------------------------+
|
||||
+------+--------------------------------------------------------------------+
|
||||
| F811 | redefinition of unused ``name`` from line ``N`` |
|
||||
+------+--------------------------------------------------------------------+
|
||||
| F812 | list comprehension redefines ``name`` from line ``N`` |
|
||||
+------+--------------------------------------------------------------------+
|
||||
| F821 | undefined name ``name`` |
|
||||
+------+--------------------------------------------------------------------+
|
||||
| F822 | undefined name ``name`` in __all__ |
|
||||
+------+--------------------------------------------------------------------+
|
||||
| F823 | local variable ``name`` ... referenced before assignment |
|
||||
+------+--------------------------------------------------------------------+
|
||||
| F831 | duplicate argument ``name`` in function definition |
|
||||
+------+--------------------------------------------------------------------+
|
||||
| F841 | local variable ``name`` is assigned to but never used |
|
||||
+------+--------------------------------------------------------------------+
|
||||
Loading…
Add table
Add a link
Reference in a new issue