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:

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