Skip to content

Commit 3d8365a

Browse files
committed
Merge branch 'master' into issue126
2 parents 69259de + 63a0a02 commit 3d8365a

23 files changed

Lines changed: 692 additions & 242 deletions

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: python
22
python:
3-
- 2.5
43
- 2.6
54
- 2.7
65
- 3.2

CHANGES.txt

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,73 @@ Changelog
55
1.x (unreleased)
66
----------------
77

8-
* Honor ``# noqa`` for errors E711 and E712. (Issue #180)
9-
108
* Report E129 instead of E125 for visually indented line with same
119
indent as next logical line. (Issue #126)
1210

11+
* Report E713 and E714 when operators ``not in`` and ``is not`` are
12+
recommended. (Issue #236)
13+
14+
* Allow the checkers to report errors on empty files. (Issue #240)
15+
16+
* Fix ignoring too many checks when ``--select`` is used with codes
17+
declared in a flake8 extension. (Issue #216)
18+
19+
* Fix regression with multiple brackets. (Issue #214)
20+
21+
* Fix ``StyleGuide`` to parse the local configuration if the
22+
keyword argument ``paths`` is specified. (Issue #246)
23+
24+
* Fix a false positive E124 for hanging indent. (Issue #254)
25+
26+
* Fix a false positive E126 with embedded colon. (Issue #144)
27+
28+
* Fix a false positive E126 when indenting with tabs. (Issue #204)
29+
30+
* Fix behaviour when ``exclude`` is in the configuration file and
31+
the current directory is not the project directory. (Issue #247)
32+
33+
* The logical checks can return ``None`` instead of an empty iterator.
34+
(Issue #250)
35+
36+
* Do not report multiple E101 if only the first indentation starts
37+
with a tab. (Issue #237)
38+
39+
* Fix a rare false positive W602. (Issue #34)
40+
41+
42+
1.4.6 (2013-07-02)
43+
------------------
44+
45+
* Honor ``# noqa`` for errors E711 and E712. (Issue #180)
46+
47+
* When both a ``tox.ini`` and a ``setup.cfg`` are present in the project
48+
directory, merge their contents. The ``tox.ini`` file takes
49+
precedence (same as before). (Issue #182)
50+
51+
* Give priority to ``--select`` over ``--ignore``. (Issue #188)
52+
53+
* Compare full path when excluding a file. (Issue #186)
54+
55+
* Correctly report other E12 errors when E123 is ignored. (Issue #103)
56+
57+
* New option ``--hang-closing`` to switch to the alternative style of
58+
closing bracket indentation for hanging indent. Add error E133 for
59+
closing bracket which is missing indentation. (Issue #103)
60+
61+
* Accept both styles of closing bracket indentation for hanging indent.
62+
Do not report error E123 in the default configuration. (Issue #103)
63+
64+
* Do not crash when running AST checks and the document contains null bytes.
65+
(Issue #184)
66+
67+
* Fix false positive E261/E262 when the file contains a BOM. (Issue #193)
68+
69+
* Fix E701, E702 and E703 not detected sometimes. (Issue #196)
70+
71+
* Fix E122 not detected in some cases. (Issue #201 and #208)
72+
73+
* Fix false positive E121 with multiple brackets. (Issue #203)
74+
1375

1476
1.4.5 (2013-03-06)
1577
------------------

docs/api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The :class:`Checker` class can be used to check a single file.
2727
.. automethod:: check_files(paths=None)
2828
.. automethod:: input_file(filename, lines=None, expected=None, line_offset=0)
2929
.. automethod:: input_dir(dirname)
30-
.. automethod:: excluded(filename)
30+
.. automethod:: excluded(filename, parent=None)
3131
.. automethod:: ignore_code(code)
3232
.. automethod:: get_checks(argument_name)
3333

docs/intro.rst

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ Quick help is available on the command line::
134134
--count print total number of errors and warnings to standard
135135
error and set exit code to 1 if total is not null
136136
--max-line-length=n set maximum allowed line length (default: 79)
137+
--hang-closing hang closing bracket instead of matching indentation of
138+
opening bracket's line
137139
--format=format set the error format [default|pylint|<custom>]
138140
--diff report only lines changed according to the unified diff
139141
received on STDIN
@@ -145,8 +147,8 @@ Quick help is available on the command line::
145147
The project options are read from the [pep8] section of the tox.ini
146148
file or the setup.cfg file located in any parent folder of the path(s)
147149
being processed. Allowed options are: exclude, filename, select,
148-
ignore, max-line-length, count, format, quiet, show-pep8, show-source,
149-
statistics, verbose.
150+
ignore, max-line-length, hang-closing, count, format, quiet, show-pep8,
151+
show-source, statistics, verbose.
150152

151153
--config=path user config file location (default: ~/.config/pep8)
152154

@@ -163,13 +165,14 @@ Example::
163165
ignore = E226,E302,E41
164166
max-line-length = 160
165167

166-
At the project level, a ``.pep8`` file, a ``tox.ini`` file or a ``setup.cfg``
167-
file is read if present. Only the first file is considered. If this file
168-
does not have a ``[pep8]`` section, no project specific configuration is
168+
At the project level, a ``tox.ini`` file or a ``setup.cfg`` file is read if
169+
present (``.pep8`` file is also supported, but it is deprecated). If none of
170+
these files have a ``[pep8]`` section, no project specific configuration is
169171
loaded.
170172

171173
If the ``ignore`` option is not in the configuration and not in the arguments,
172-
only the error codes ``E226`` and ``E241/E242`` are ignored (see below).
174+
only the error codes ``E123/E133``, ``E226`` and ``E241/E242`` are ignored
175+
(see below).
173176

174177

175178
Error codes
@@ -195,7 +198,7 @@ This is the current list of error and warning codes:
195198
+----------+----------------------------------------------------------------------+
196199
| E122 (^) | continuation line missing indentation or outdented |
197200
+----------+----------------------------------------------------------------------+
198-
| E123 (^) | closing bracket does not match indentation of opening bracket's line |
201+
| E123 (*) | closing bracket does not match indentation of opening bracket's line |
199202
+----------+----------------------------------------------------------------------+
200203
| E124 (^) | closing bracket does not match visual indentation |
201204
+----------+----------------------------------------------------------------------+
@@ -209,6 +212,8 @@ This is the current list of error and warning codes:
209212
+----------+----------------------------------------------------------------------+
210213
| E129 (^) | visually indented line with same indent as next logical line |
211214
+----------+----------------------------------------------------------------------+
215+
| E133 (*) | closing bracket is missing indentation |
216+
+----------+----------------------------------------------------------------------+
212217
+----------+----------------------------------------------------------------------+
213218
| **E2** | *Whitespace* |
214219
+----------+----------------------------------------------------------------------+
@@ -299,6 +304,10 @@ This is the current list of error and warning codes:
299304
+----------+----------------------------------------------------------------------+
300305
| E712 (^) | comparison to True should be 'if cond is True:' or 'if cond:' |
301306
+----------+----------------------------------------------------------------------+
307+
| E713 | evaluating membership should be 'elem not in collection' |
308+
+----------+----------------------------------------------------------------------+
309+
| E714 | testing unequal identities should be 'x is not y' |
310+
+----------+----------------------------------------------------------------------+
302311
| E721 | do not compare types, use 'isinstance()' |
303312
+----------+----------------------------------------------------------------------+
304313
+----------+----------------------------------------------------------------------+
@@ -339,9 +348,12 @@ This is the current list of error and warning codes:
339348
| W604 | backticks are deprecated, use 'repr()' |
340349
+----------+----------------------------------------------------------------------+
341350

342-
**(*)** In the default configuration, the checks **E226**, **E241**
343-
and **E242** are ignored because they are not rules unanimously accepted,
344-
and `PEP 8`_ does not enforce them.
351+
352+
**(*)** In the default configuration, the checks **E123**, **E133**, **E226**,
353+
**E241** and **E242** are ignored because they are not rules unanimously
354+
accepted, and `PEP 8`_ does not enforce them. The check **E133** is mutually
355+
exclusive with check **E123**. Use switch ``--hang-closing`` to report **E133**
356+
instead of **E123**.
345357

346358
**(^)** These checks can be disabled at the line level using the ``# noqa``
347359
special comment. This possibility should be reserved for special cases.

0 commit comments

Comments
 (0)