third_party/pep8
10 years agoAdd total_lines to the developer documentation
Florent Xicluna [Mon, 14 Apr 2014 15:04:20 +0000 (17:04 +0200)]
Add total_lines to the developer documentation

10 years agoMerge checker W292 with checker W391 for better performance
Florent Xicluna [Mon, 14 Apr 2014 14:58:05 +0000 (16:58 +0200)]
Merge checker W292 with checker W391 for better performance

10 years agoSwitch two lines
Florent Xicluna [Mon, 14 Apr 2014 14:35:39 +0000 (16:35 +0200)]
Switch two lines

10 years agoCheck the last line even if it has not EOL; issue #273
Florent Xicluna [Mon, 14 Apr 2014 14:23:12 +0000 (16:23 +0200)]
Check the last line even if it has not EOL; issue #273

10 years agoRelease version 1.5.5
Florent Xicluna [Thu, 10 Apr 2014 08:54:30 +0000 (10:54 +0200)]
Release version 1.5.5

10 years agoCreate set of tokens for comparison; skip comments completely for E22 checks
Florent Xicluna [Tue, 8 Apr 2014 23:08:28 +0000 (01:08 +0200)]
Create set of tokens for comparison; skip comments completely for E22 checks

10 years agoFix regression with E22 checks and inline comments; issue #271
Florent Xicluna [Tue, 8 Apr 2014 22:31:29 +0000 (00:31 +0200)]
Fix regression with E22 checks and inline comments; issue #271

10 years agoRelease version 1.5.4
Florent Xicluna [Mon, 7 Apr 2014 05:53:05 +0000 (07:53 +0200)]
Release version 1.5.4

10 years agoRefactor method build_tokens_line
Florent Xicluna [Sun, 6 Apr 2014 12:30:23 +0000 (14:30 +0200)]
Refactor method build_tokens_line

10 years agoFix negative offset with E303 before a multi-line docstring; issue #269
Florent Xicluna [Sat, 5 Apr 2014 20:52:14 +0000 (22:52 +0200)]
Fix negative offset with E303 before a multi-line docstring; issue #269

10 years agoBack to development
Florent Xicluna [Sat, 5 Apr 2014 05:55:35 +0000 (07:55 +0200)]
Back to development

10 years agoRelease version 1.5.3
Florent Xicluna [Fri, 4 Apr 2014 19:47:24 +0000 (21:47 +0200)]
Release version 1.5.3

10 years agoFix wrong offset computation when error is on the last char of a physical line; issue...
Florent Xicluna [Fri, 4 Apr 2014 19:45:55 +0000 (21:45 +0200)]
Fix wrong offset computation when error is on the last char of a physical line; issue #268

10 years agoUpdate Travis configuration, and the wheel badge
Florent Xicluna [Fri, 4 Apr 2014 09:22:59 +0000 (11:22 +0200)]
Update Travis configuration, and the wheel badge

10 years agoTests should pass for the tarball distributed on PyPI; issue 267
Florent Xicluna [Fri, 4 Apr 2014 07:59:55 +0000 (09:59 +0200)]
Tests should pass for the tarball distributed on PyPI; issue 267

10 years agoRelease version 1.5.2
Florent Xicluna [Fri, 4 Apr 2014 06:56:34 +0000 (08:56 +0200)]
Release version 1.5.2

10 years agoDo not allow newline after parameter equal; issue #252
Florent Xicluna [Thu, 3 Apr 2014 22:22:38 +0000 (00:22 +0200)]
Do not allow newline after parameter equal; issue #252

10 years agoFix caret position when line contains tabs
Florent Xicluna [Thu, 3 Apr 2014 21:55:02 +0000 (23:55 +0200)]
Fix caret position when line contains tabs

10 years agoReport correct line number for E303 with comments; issue #60
Florent Xicluna [Thu, 3 Apr 2014 21:28:21 +0000 (23:28 +0200)]
Report correct line number for E303 with comments; issue #60

10 years agoAdd tests relevant for issue #220
Florent Xicluna [Thu, 3 Apr 2014 21:23:12 +0000 (23:23 +0200)]
Add tests relevant for issue #220

10 years agoAdd some tests with row and column
Florent Xicluna [Thu, 3 Apr 2014 21:21:26 +0000 (23:21 +0200)]
Add some tests with row and column

10 years agoAllow to test row and column.
Florent Xicluna [Thu, 3 Apr 2014 21:17:51 +0000 (23:17 +0200)]
Allow to test row and column.

10 years agoFix line number and offset for E125 with multi-line strings; issue #220
Florent Xicluna [Thu, 3 Apr 2014 17:19:13 +0000 (19:19 +0200)]
Fix line number and offset for E125 with multi-line strings; issue #220

10 years agoRefactor the logical line building and checking.
Florent Xicluna [Thu, 3 Apr 2014 16:52:29 +0000 (18:52 +0200)]
Refactor the logical line building and checking.

10 years agoFix line number and offset for multi-line strings; issue #220
Florent Xicluna [Thu, 3 Apr 2014 16:33:27 +0000 (18:33 +0200)]
Fix line number and offset for multi-line strings; issue #220

10 years agoReorder changelog
Florent Xicluna [Thu, 3 Apr 2014 16:30:36 +0000 (18:30 +0200)]
Reorder changelog

10 years agoAdd a second test for issue #265
Florent Xicluna [Wed, 2 Apr 2014 23:32:11 +0000 (01:32 +0200)]
Add a second test for issue #265

10 years agoDistribute a universal wheel file, .whl
Florent Xicluna [Wed, 2 Apr 2014 23:11:31 +0000 (01:11 +0200)]
Distribute a universal wheel file, .whl

10 years agoFix E501 not detected in comments with Python 2.5
Florent Xicluna [Wed, 2 Apr 2014 23:09:02 +0000 (01:09 +0200)]
Fix E501 not detected in comments with Python 2.5

10 years agoFix false positive E121/E126 with multi-line string; issue #265
Florent Xicluna [Wed, 2 Apr 2014 22:32:28 +0000 (00:32 +0200)]
Fix false positive E121/E126 with multi-line string; issue #265

10 years agoReview comment
Florent Xicluna [Wed, 2 Apr 2014 22:12:49 +0000 (00:12 +0200)]
Review comment

10 years agoUse the open() context manager, supported since Python 2.5
Florent Xicluna [Fri, 28 Mar 2014 21:46:02 +0000 (22:46 +0100)]
Use the open() context manager, supported since Python 2.5

10 years agoMinor changes
Florent Xicluna [Fri, 28 Mar 2014 21:34:44 +0000 (22:34 +0100)]
Minor changes

10 years agoBack to development; review some docstrings in relation with PEP 257.
Florent Xicluna [Fri, 28 Mar 2014 21:20:57 +0000 (22:20 +0100)]
Back to development; review some docstrings in relation with PEP 257.

10 years agoRelease version 1.5.1
Florent Xicluna [Thu, 27 Mar 2014 17:31:24 +0000 (18:31 +0100)]
Release version 1.5.1

10 years agoFix a crash with E125 on multi-line strings; closes #263
Florent Xicluna [Thu, 27 Mar 2014 11:00:03 +0000 (12:00 +0100)]
Fix a crash with E125 on multi-line strings; closes #263

10 years agoRelease version 1.5
Florent Xicluna [Wed, 26 Mar 2014 11:00:08 +0000 (12:00 +0100)]
Release version 1.5

10 years agoRemove an extra comma in the test
Florent Xicluna [Tue, 25 Mar 2014 23:48:48 +0000 (00:48 +0100)]
Remove an extra comma in the test

10 years agoAck PyPy SyntaxError
Florent Xicluna [Tue, 25 Mar 2014 23:43:59 +0000 (00:43 +0100)]
Ack PyPy SyntaxError

10 years agoAdd a message for test_check_nullbytes
Florent Xicluna [Tue, 25 Mar 2014 23:31:04 +0000 (00:31 +0100)]
Add a message for test_check_nullbytes

10 years agoReview messages for E713 and E714
Florent Xicluna [Tue, 25 Mar 2014 23:10:13 +0000 (00:10 +0100)]
Review messages for E713 and E714

10 years agoReport E131 instead of E121 / E126 for unaligned hanging indent
Florent Xicluna [Tue, 25 Mar 2014 22:28:21 +0000 (23:28 +0100)]
Report E131 instead of E121 / E126 for unaligned hanging indent

10 years agoMerge. Allow long lines in docstrings and comments.
Florent Xicluna [Tue, 25 Mar 2014 18:35:37 +0000 (19:35 +0100)]
Merge.  Allow long lines in docstrings and comments.

Allow long lines in multiline strings and comments if they cannot be wrapped; issue #224
Optionally disable physical line checks inside multiline strings, using '# noqa'; issue #242

10 years agoSeparate Changes and Bug fixes in the changelog
Florent Xicluna [Tue, 25 Mar 2014 17:57:59 +0000 (18:57 +0100)]
Separate Changes and Bug fixes in the changelog

10 years agoClarify E121 and E126 for hanging indents, and reports all over-indented continuation...
Florent Xicluna [Tue, 25 Mar 2014 01:45:40 +0000 (02:45 +0100)]
Clarify E121 and E126 for hanging indents, and reports all over-indented continuation lines under E126.

10 years agoMerge, add E265 for space before block comment; issue #190
Florent Xicluna [Tue, 25 Mar 2014 00:39:06 +0000 (01:39 +0100)]
Merge, add E265 for space before block comment; issue #190

10 years agoMerge branch 'master' into issue126
Florent Xicluna [Tue, 25 Mar 2014 00:13:47 +0000 (01:13 +0100)]
Merge branch 'master' into issue126

10 years agoCatch more E713 and E714 with a regular expression; issue #236 continued
Florent Xicluna [Mon, 24 Mar 2014 23:50:05 +0000 (00:50 +0100)]
Catch more E713 and E714 with a regular expression; issue #236 continued

10 years agoMerge pull request #260 from chrismedrela/ticket236
Florent Xicluna [Mon, 24 Mar 2014 22:59:30 +0000 (23:59 +0100)]
Merge pull request #260 from chrismedrela/ticket236

Fixed #236 -- added checks for 'not X in L' and 'not X is Y'

10 years agoRelax a bit the regex for W602, 3-arguments raise; closes #34
Florent Xicluna [Mon, 24 Mar 2014 22:56:59 +0000 (23:56 +0100)]
Relax a bit the regex for W602, 3-arguments raise; closes #34

10 years agoA false positivee E126 when indenting with tabs; closes #204
Florent Xicluna [Mon, 24 Mar 2014 22:26:01 +0000 (23:26 +0100)]
A false positivee E126 when indenting with tabs; closes #204

10 years agoMinor change in previous patch
Florent Xicluna [Mon, 24 Mar 2014 20:53:02 +0000 (21:53 +0100)]
Minor change in previous patch

10 years agoMerge pull request #227 from solj/disable-w601
Florent Xicluna [Mon, 24 Mar 2014 20:49:43 +0000 (21:49 +0100)]
Merge pull request #227 from solj/disable-w601

Allow disable of W601

10 years agoA false positive E126 with embedded colon; fixes #144
Florent Xicluna [Mon, 24 Mar 2014 20:34:00 +0000 (21:34 +0100)]
A false positive E126 with embedded colon; fixes #144

10 years agoAvoid printing errors twice
Florent Xicluna [Mon, 24 Mar 2014 20:26:36 +0000 (21:26 +0100)]
Avoid printing errors twice

10 years agoDo not report multiple E101 if only one line starts with a tab; issue #237
Florent Xicluna [Mon, 24 Mar 2014 18:20:50 +0000 (19:20 +0100)]
Do not report multiple E101 if only one line starts with a tab; issue #237

10 years agoImprove the test framework to count the errors, motivated by issue #237
Florent Xicluna [Mon, 24 Mar 2014 18:13:43 +0000 (19:13 +0100)]
Improve the test framework to count the errors, motivated by issue #237

10 years agoImprove fix for issue #247, relative path not always start with ./
Florent Xicluna [Mon, 24 Mar 2014 12:26:39 +0000 (13:26 +0100)]
Improve fix for issue #247, relative path not always start with ./

10 years agoAdded a test from issue #215
Florent Xicluna [Mon, 24 Mar 2014 00:32:20 +0000 (01:32 +0100)]
Added a test from issue #215

10 years agoInacurracy in the documentation of the ignore option
Florent Xicluna [Mon, 24 Mar 2014 00:09:16 +0000 (01:09 +0100)]
Inacurracy in the documentation of the ignore option

10 years agoThe logical checks can return None; issue #250
Florent Xicluna [Sun, 23 Mar 2014 23:52:47 +0000 (00:52 +0100)]
The logical checks can return None; issue #250

10 years agoFix usage of in the project config file; issue #247
Florent Xicluna [Sun, 23 Mar 2014 23:41:28 +0000 (00:41 +0100)]
Fix usage of  in the project config file; issue #247

10 years agoFix a false positive E124 for hanging indent: issue #254
Florent Xicluna [Sun, 23 Mar 2014 17:37:35 +0000 (18:37 +0100)]
Fix a false positive E124 for hanging indent: issue #254

10 years agoRevert previous change and fix the 'paths' keyword argument instead; fixes #246
Florent Xicluna [Sun, 23 Mar 2014 16:19:57 +0000 (17:19 +0100)]
Revert previous change and fix the 'paths' keyword argument instead; fixes #246

10 years agoMerge pull request #259 from kynan/259-optional-argument-arglist-for-styleguide
Florent Xicluna [Sun, 23 Mar 2014 13:41:02 +0000 (14:41 +0100)]
Merge pull request #259 from kynan/259-optional-argument-arglist-for-styleguide

StyleGuide accepts optional keyword argument arglist

10 years agoSlightly improve readability
Florent Xicluna [Sun, 23 Mar 2014 13:38:51 +0000 (14:38 +0100)]
Slightly improve readability

10 years agoStyleGuide accepts optional keyword argument arglist
Florian Rathgeber [Sun, 23 Mar 2014 13:18:57 +0000 (13:18 +0000)]
StyleGuide accepts optional keyword argument arglist

If given, arglist is passed on to process_options. This allows
specifying a non-empty argument list when using pep8 as a library
where command line arguments are not parsed.

10 years agoAllow long lines in comments too, with similar rules; related to issue #224
Florent Xicluna [Sun, 23 Mar 2014 10:54:04 +0000 (11:54 +0100)]
Allow long lines in comments too, with similar rules; related to issue #224

10 years agoMerge branch 'master' of https://github.com/gward/pep8 into gward-master
Florent Xicluna [Sun, 23 Mar 2014 01:45:41 +0000 (02:45 +0100)]
Merge branch 'master' of https://github.com/gward/pep8 into gward-master

10 years agoMerge pull request #241 from deshipu/master
Florent Xicluna [Sat, 22 Mar 2014 23:46:44 +0000 (00:46 +0100)]
Merge pull request #241 from deshipu/master

Fix #240: Allow errors on empty files

10 years agoFix regression with multiple brackets; issue #214
Florent Xicluna [Sat, 22 Mar 2014 22:59:50 +0000 (23:59 +0100)]
Fix regression with multiple brackets; issue #214

10 years agoAdd 3.4 to tox.ini
Florent Xicluna [Sat, 22 Mar 2014 22:59:08 +0000 (23:59 +0100)]
Add 3.4 to tox.ini

10 years agoNo more support for Python 2.5 on Travis
Florent Xicluna [Sat, 22 Mar 2014 21:31:57 +0000 (22:31 +0100)]
No more support for Python 2.5 on Travis

10 years agoAdd one more test case for issue #224 (based on code review)
Greg Ward [Sun, 17 Nov 2013 22:49:47 +0000 (17:49 -0500)]
Add one more test case for issue #224 (based on code review)

10 years agoMake maybe_check_physical() easier to understand (based on code review)
Greg Ward [Sun, 17 Nov 2013 22:47:50 +0000 (17:47 -0500)]
Make maybe_check_physical() easier to understand (based on code review)

- reorder so common case comes first
- rewrite docstring
- expand/clarify comments

10 years agoOptionally disable physical line checks inside multiline strings (issue #242)
Greg Ward [Fri, 8 Nov 2013 21:09:49 +0000 (16:09 -0500)]
Optionally disable physical line checks inside multiline strings (issue #242)

The trick is to attach the "# nopep8" (or "# noqa") comment after the
multiline string. In fact, it just has to be on the line that ends the
multiline string -- like most other noqa() checks, this is a dumb scan
of the physical line, not a fancy token-based check.

10 years agoAllow long lines in multiline strings if they cannot be wrapped (issue #224).
Greg Ward [Fri, 8 Nov 2013 20:04:39 +0000 (15:04 -0500)]
Allow long lines in multiline strings if they cannot be wrapped (issue #224).

10 years agoFix an incorrect "W391 blank line at EOF"
Greg Ward [Fri, 8 Nov 2013 20:37:14 +0000 (15:37 -0500)]
Fix an incorrect "W391 blank line at EOF"

It only happens when there is a multiline string at EOF that happens
to contain a blank line. Introduced by my special treatment of
multiline strings.

10 years agoCheck physical lines after tokenizing them.
Greg Ward [Fri, 8 Nov 2013 19:37:25 +0000 (14:37 -0500)]
Check physical lines after tokenizing them.

This will make it possible to treat physical lines in multiline
strings distinctly, e.g. for issue #224 and #242 (not addressed yet;
this is just a prerequisite).

Details:
- readline_check_physical() is gone: now we only need readline()
- but now setting self.indent_char in check_physical() comes too late,
  so move that side effect up to readline()
- add maybe_check_physical() to decide after every token if it's time
  to check physical lines and, if so, do it

10 years agoAdd some test cases for multiline strings.
Greg Ward [Fri, 8 Nov 2013 19:59:38 +0000 (14:59 -0500)]
Add some test cases for multiline strings.

Since I'm about to add special treatment of multiline strings, I
thought it best to ensure that we preserve the existing behaviour.

10 years agoFix #240: Allow errors on empty files
Radomir Dopieralski [Thu, 7 Nov 2013 15:36:33 +0000 (16:36 +0100)]
Fix #240: Allow errors on empty files

The noqa check crashes when the file is empty. The soultion is to not
check for noqa when the file is empty -- if it's empty, the user might
not possibly put any #noqa comments in there.

10 years agoFixed #236 -- added checks for 'not X in L' and 'not X is Y'
Christopher Medrela [Thu, 24 Oct 2013 18:53:07 +0000 (20:53 +0200)]
Fixed #236 -- added checks for 'not X in L' and 'not X is Y'

10 years agoAllow disable of W601
Sol Jerome [Thu, 5 Sep 2013 17:37:59 +0000 (12:37 -0500)]
Allow disable of W601

While has_key no longer exists for python 3, there are still libraries
which have this method and do not allow for 'key in dict'. This enables
the "nopep8/noqa" methods of disabling the warning per-line.

Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
10 years agoFix issue with --select and flake8 extensions; issue #216
Florent Xicluna [Thu, 4 Jul 2013 10:56:54 +0000 (12:56 +0200)]
Fix issue with --select and flake8 extensions; issue #216

10 years agoRelease version 1.4.6
Florent Xicluna [Tue, 2 Jul 2013 14:05:35 +0000 (16:05 +0200)]
Release version 1.4.6

10 years agoAnother E122 not detected
Florent Xicluna [Sun, 16 Jun 2013 18:09:03 +0000 (20:09 +0200)]
Another E122 not detected

10 years agoMissing blank line in documentation
Florent Xicluna [Sat, 15 Jun 2013 16:28:20 +0000 (18:28 +0200)]
Missing blank line in documentation

10 years agoMerge pull request #207 from jcrocholl/issue103
Florent Xicluna [Sat, 15 Jun 2013 15:05:09 +0000 (08:05 -0700)]
Merge pull request #207 from jcrocholl/issue103

Fix issue #103 - closing bracket indentation gains flexibility

10 years agoFix false positive E121 with multiple brackets; issue #203
Florent Xicluna [Sat, 15 Jun 2013 14:57:26 +0000 (16:57 +0200)]
Fix false positive E121 with multiple brackets; issue #203

10 years agoFix E122 not detected in some cases; issue #201
Florent Xicluna [Sat, 15 Jun 2013 14:21:39 +0000 (16:21 +0200)]
Fix E122 not detected in some cases; issue #201

11 years agoDon't crash when checking the BOM on Unicode lines, with Python 2
Florent Xicluna [Sun, 5 May 2013 00:28:06 +0000 (02:28 +0200)]
Don't crash when checking the BOM on Unicode lines, with Python 2

11 years agoFix E70x not detected sometimes; issue #196
Florent Xicluna [Fri, 3 May 2013 21:23:49 +0000 (23:23 +0200)]
Fix E70x not detected sometimes; issue #196

11 years agoOf course the testsuite needs fixing to ignore E123 too
Florent Xicluna [Wed, 1 May 2013 22:59:48 +0000 (00:59 +0200)]
Of course the testsuite needs fixing to ignore E123 too

11 years agoAccept both styles of closing bracket indentation, ignore E123 in the default configu...
Florent Xicluna [Wed, 1 May 2013 22:54:49 +0000 (00:54 +0200)]
Accept both styles of closing bracket indentation, ignore E123 in the default configuration

11 years agoMore tests for E265 with the shebang
Florent Xicluna [Wed, 1 May 2013 22:25:24 +0000 (00:25 +0200)]
More tests for E265 with the shebang

11 years agoFix tests on Python 2.5
Florent Xicluna [Wed, 1 May 2013 22:10:03 +0000 (00:10 +0200)]
Fix tests on Python 2.5

11 years agoAdd tests for E265
Florent Xicluna [Wed, 1 May 2013 21:57:05 +0000 (23:57 +0200)]
Add tests for E265

11 years agoAdd E265 for space before block comment; issue #190
Florent Xicluna [Wed, 1 May 2013 21:48:21 +0000 (23:48 +0200)]
Add E265 for space before block comment; issue #190

11 years agoFix BOM for Python 3 too, add changelog entry
Florent Xicluna [Wed, 1 May 2013 21:39:56 +0000 (23:39 +0200)]
Fix BOM for Python 3 too, add changelog entry

11 years agoMerge pull request #193 from sporty/master
Florent Xicluna [Wed, 1 May 2013 21:02:09 +0000 (14:02 -0700)]
Merge pull request #193 from sporty/master

utf-8 BOM support