diff options
author | Sam Vilain <svilain@saymedia.com> | 2012-06-06 13:44:52 -0700 |
---|---|---|
committer | Sam Vilain <svilain@saymedia.com> | 2012-06-06 14:10:57 -0700 |
commit | 7d06f2d5065d1efaf4e053a3a5db75e8cb15beb6 (patch) | |
tree | 72ec0b823c44761137ce8ca5b6133cd5e974024e /testsuite/E12.py | |
parent | b8ddbf8566f23e755eeb240b2a946bdbedf091c3 (diff) | |
download | pep8-7d06f2d5065d1efaf4e053a3a5db75e8cb15beb6.tar.gz |
Relax E127/E128 for aligned homogenous tokens
When using visual indenting, there is a tendency to communicate through
'interpretive dance', which is an affectionate name I have for arbitrary
extra whitespace inserted to visually communicate 'something' to the
reader.
The examples in the test suite all start with a token which matches the
same token on the previous line. This new rule permits indents to a
matching level as a token on the previous line, but only if the tokens
are the same.
Add some tests to show the quirks with the current rule, which allows
the first visual indent line to align with any token whatsoever.
Diffstat (limited to 'testsuite/E12.py')
-rw-r--r-- | testsuite/E12.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/testsuite/E12.py b/testsuite/E12.py index c5e767a..f5c7c97 100644 --- a/testsuite/E12.py +++ b/testsuite/E12.py @@ -160,4 +160,27 @@ troublesome_hash_ii = { "long key that tends to happen more when you're indented": "stringwithalongtoken you don't want to break", } -#: +#: E128 +foo(1, 2, 3, +4, 5, 6) +#: E128 +foo(1, 2, 3, + 4, 5, 6) +#: E128 +foo(1, 2, 3, + 4, 5, 6) +#: E128 +foo(1, 2, 3, + 4, 5, 6) +#: E127 +foo(1, 2, 3, + 4, 5, 6) +#: E127 +foo(1, 2, 3, + 4, 5, 6) +#: E127 +foo(1, 2, 3, + 4, 5, 6) +#: E127 +foo(1, 2, 3, + 4, 5, 6) |