diff options
| author | Lukasz Langa <ambv@fb.com> | 2016-11-27 17:42:00 -0800 |
|---|---|---|
| committer | Lukasz Langa <ambv@fb.com> | 2016-11-28 10:34:38 -0800 |
| commit | 2f1338c34277a39bd0f49145c372c804cd79552e (patch) | |
| tree | d39043687f42fb676118060b7d45efb794afad7a /docs/source/user | |
| parent | b8ce1334d099aee9c7d2ea72f75bf01ccbe2b040 (diff) | |
| download | flake8-2f1338c34277a39bd0f49145c372c804cd79552e.tar.gz | |
Assign missing codes to PyFlakes messages
Some PyFlakes messages weren't covered by unique messages, making them
impossible to select/ignore. This is now fixed.
To ensure we don't regress in the future, a test has been added that fails if
there's any uncovered messages.
Diffstat (limited to 'docs/source/user')
| -rw-r--r-- | docs/source/user/error-codes.rst | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/docs/source/user/error-codes.rst b/docs/source/user/error-codes.rst index 8bff640..dbaf35e 100644 --- a/docs/source/user/error-codes.rst +++ b/docs/source/user/error-codes.rst @@ -1,3 +1,5 @@ +.. _error_codes: + ========================= Error / Violation Codes ========================= @@ -22,6 +24,36 @@ generates its own :term:`error code`\ s for ``pyflakes``: +------+---------------------------------------------------------------------+ | F405 | ``name`` may be undefined, or defined from star imports: ``module`` | +------+---------------------------------------------------------------------+ +| F406 | 'from ``module`` import \*' only allowed at module level | ++------+---------------------------------------------------------------------+ +| F407 | an undefined ``__future__`` feature name was imported | ++------+---------------------------------------------------------------------+ ++------+---------------------------------------------------------------------+ +| F601 | dictionary key ``name`` repeated with different values | ++------+---------------------------------------------------------------------+ +| F602 | dictionary key variable ``name`` repeated with different values | ++------+---------------------------------------------------------------------+ +| F621 | too many expressions in an assignment with star-unpacking | ++------+---------------------------------------------------------------------+ +| F622 | two or more starred expressions in an assignment ``(a, *b, *c = d)``| ++------+---------------------------------------------------------------------+ +| F631 | assertion test is a tuple, which are always ``True`` | ++------+---------------------------------------------------------------------+ ++------+---------------------------------------------------------------------+ +| F701 | a ``break`` statement outside of a ``while`` or ``for`` loop | ++------+---------------------------------------------------------------------+ +| F702 | a ``continue`` statement outside of a ``while`` or ``for`` loop | ++------+---------------------------------------------------------------------+ +| F703 | a ``continue`` statement in a ``finally`` block in a loop | ++------+---------------------------------------------------------------------+ +| F704 | a ``yield`` or ``yield from`` statement outside of a function | ++------+---------------------------------------------------------------------+ +| F705 | a ``return`` statement with arguments inside a generator | ++------+---------------------------------------------------------------------+ +| F706 | a ``return`` statement outside of a function/method | ++------+---------------------------------------------------------------------+ +| F707 | an ``except:`` block as not the last exception handler | ++------+---------------------------------------------------------------------+ +------+---------------------------------------------------------------------+ | F811 | redefinition of unused ``name`` from line ``N`` | +------+---------------------------------------------------------------------+ @@ -29,7 +61,7 @@ generates its own :term:`error code`\ s for ``pyflakes``: +------+---------------------------------------------------------------------+ | F821 | undefined name ``name`` | +------+---------------------------------------------------------------------+ -| F822 | undefined name ``name`` in __all__ | +| F822 | undefined name ``name`` in ``__all__`` | +------+---------------------------------------------------------------------+ | F823 | local variable ``name`` ... referenced before assignment | +------+---------------------------------------------------------------------+ |
