summaryrefslogtreecommitdiff
path: root/testsuite/E23.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix false report of E231 in some casesFlorent Xicluna2012-12-091-0/+1
|
* Fix E231 for nested dictAnastasia Morozova2012-12-081-0/+2
|
* Add a hybrid checker for continuation line indentationSam Vilain2012-05-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PEP8 has some specific recommendations early on which relate to indenting continuation lines. Specifically, it distinguishes between 'visual indenting' and 'hanging indents'. This change implements these rules, adding several new errors (for now): * E120 - traps on a visual indent with hanging indent lines following * E121 - traps overly–indented lines inside visual indent regions * E122 - catches the evil and wrong indenting default that emacs' python-mode applies to 'loose fingernails' (not canonical) * E123 - catches continuation lines missing extra indentation when the previous line started a hanging indent * E124 - catches continuation lines not aligned on 4 spaces; note this required a fix to the E23.py test * E125 - catches continuation lines with 8 or more space indents relative to the previous line without good reason * E126 - ensures that indentation leaves blocks visually distinct All of these errors are directly justifiable from text and examples in the PEP8 document, and some examples are directly copied from PEP8. The exception to this is E122, which the PEP8 standard appears neutral on but nonetheless I feel is intrinsically related with the rules which are defined here; to not enforce it would permit multiple valid indent levels for closing brackets which start lines, leading to ambiguity. All the PEP8 examples leave the closing bracket on the previous line, avoiding this question. This E122 rule agrees with K&R, KNF, Linux, this VIM auto–indent script: http://www.vim.org/scripts/script.php?script_id=974 and the fix to python-mode achieved by the elisp fragment on: http://stackoverflow.com/revisions/5361478/2 See testsuite/E12.py for many examples.
* Reorganize the test suite in order to check more failures with fewer test files.Florent Xicluna2010-09-111-0/+12
--HG-- rename : testsuite/E101.py => testsuite/E10.py rename : testsuite/E111.py => testsuite/E11.py rename : testsuite/E202not.py => testsuite/E20.py rename : testsuite/E211not.py => testsuite/E21.py rename : testsuite/E225not.py => testsuite/E22.py rename : testsuite/E231.py => testsuite/E23.py rename : testsuite/E241.py => testsuite/E24.py rename : testsuite/E251.py => testsuite/E25.py rename : testsuite/E261.py => testsuite/E26.py rename : testsuite/E301.py => testsuite/E30.py rename : testsuite/E301not.py => testsuite/E30not.py rename : testsuite/E401.py => testsuite/E40.py rename : testsuite/E501.py => testsuite/E50.py rename : testsuite/E701.py => testsuite/E70.py rename : testsuite/W191.py => testsuite/W19.py rename : testsuite/W292.py => testsuite/W29.py rename : testsuite/W391.py => testsuite/W39.py rename : testsuite/W601.py => testsuite/W60.py rename : testsuite/E113not.py => testsuite/latin-1.py rename : testsuite/E501not.py => testsuite/utf-8.py