diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2013-03-21 23:04:07 +0100 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2013-03-21 23:04:07 +0100 |
commit | 4b52be5fd2a4c8afd4d1fd172103080b9185ac93 (patch) | |
tree | 3e427f72476c4f9e8b6a8e7cd0a2814d6e540444 /docs | |
parent | 15392bdaa73fbf9881a3f0eadd3eef5b9db1adfb (diff) | |
download | pep8-4b52be5fd2a4c8afd4d1fd172103080b9185ac93.tar.gz |
Mention the # noqa feature in the documentation; issue #180
Diffstat (limited to 'docs')
-rw-r--r-- | docs/intro.rst | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/docs/intro.rst b/docs/intro.rst index b9db697..c22df98 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -191,21 +191,21 @@ This is the current list of error and warning codes: | E113 | unexpected indentation | +----------+----------------------------------------------------------------------+ +----------+----------------------------------------------------------------------+ -| E121 | continuation line indentation is not a multiple of four | +| E121 (^) | continuation line indentation is not a multiple of four | +----------+----------------------------------------------------------------------+ -| E122 | continuation line missing indentation or outdented | +| E122 (^) | continuation line missing indentation or outdented | +----------+----------------------------------------------------------------------+ -| E123 | closing bracket does not match indentation of opening bracket's line | +| E123 (^) | closing bracket does not match indentation of opening bracket's line | +----------+----------------------------------------------------------------------+ -| E124 | closing bracket does not match visual indentation | +| E124 (^) | closing bracket does not match visual indentation | +----------+----------------------------------------------------------------------+ -| E125 | continuation line does not distinguish itself from next logical line | +| E125 (^) | continuation line does not distinguish itself from next logical line | +----------+----------------------------------------------------------------------+ -| E126 | continuation line over-indented for hanging indent | +| E126 (^) | continuation line over-indented for hanging indent | +----------+----------------------------------------------------------------------+ -| E127 | continuation line over-indented for visual indent | +| E127 (^) | continuation line over-indented for visual indent | +----------+----------------------------------------------------------------------+ -| E128 | continuation line under-indented for visual indent | +| E128 (^) | continuation line under-indented for visual indent | +----------+----------------------------------------------------------------------+ +----------+----------------------------------------------------------------------+ | **E2** | *Whitespace* | @@ -280,7 +280,7 @@ This is the current list of error and warning codes: +----------+----------------------------------------------------------------------+ | **E5** | *Line length* | +----------+----------------------------------------------------------------------+ -| E501 | line too long (82 > 79 characters) | +| E501 (^) | line too long (82 > 79 characters) | +----------+----------------------------------------------------------------------+ | E502 | the backslash is redundant between brackets | +----------+----------------------------------------------------------------------+ @@ -293,9 +293,9 @@ This is the current list of error and warning codes: +----------+----------------------------------------------------------------------+ | E703 | statement ends with a semicolon | +----------+----------------------------------------------------------------------+ -| E711 | comparison to None should be 'if cond is None:' | +| E711 (^) | comparison to None should be 'if cond is None:' | +----------+----------------------------------------------------------------------+ -| E712 | comparison to True should be 'if cond is True:' or 'if cond:' | +| E712 (^) | comparison to True should be 'if cond is True:' or 'if cond:' | +----------+----------------------------------------------------------------------+ | E721 | do not compare types, use 'isinstance()' | +----------+----------------------------------------------------------------------+ @@ -341,6 +341,11 @@ This is the current list of error and warning codes: and **E242** are ignored because they are not rules unanimously accepted, and `PEP 8`_ does not enforce them. +**(^)** These checks can be disabled at the line level using the ``# noqa`` +special comment. This possibility should be reserved for special cases. + + *Special cases aren't special enough to break the rules.* + Note: most errors can be listed with such one-liner:: |