Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Cloud:OpenStack:Icehouse
python-pep8
0001-reverted-fix-for-issue-204-added-check-for...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-reverted-fix-for-issue-204-added-check-for-214.patch of Package python-pep8
From 4534719491fe71aa64a6ede316f3ee58d34c594f Mon Sep 17 00:00:00 2001 From: Eric Casteleijn <ec@trapit.com> Date: Fri, 30 Aug 2013 11:58:25 -0700 Subject: [PATCH] reverted "fix" for issue 204, added check for 214 --- pep8.py | 5 +++-- testsuite/E12not.py | 13 +++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pep8.py b/pep8.py index e0035b3..44de631 100755 --- a/pep8.py +++ b/pep8.py @@ -431,6 +431,7 @@ def continued_indentation(logical_line, tokens, indent_level, hang_closing, if verbose >= 3: print(">>> " + tokens[0][4].rstrip()) + last_token_multiline = False for token_type, text, start, end, line in tokens: newline = row < start[0] - first_row @@ -538,7 +539,6 @@ def continued_indentation(logical_line, tokens, indent_level, hang_closing, for idx in range(row, -1, -1): if parens[idx]: parens[idx] -= 1 - rel_indent[row] = rel_indent[idx] break assert len(indent) == depth + 1 if start[1] not in indent_chances: @@ -547,7 +547,7 @@ def continued_indentation(logical_line, tokens, indent_level, hang_closing, last_token_multiline = (start[0] != end[0]) - if indent_next and expand_indent(line) == indent_level + 4: + if indent_next and rel_indent[-1] == 4: yield (last_indent, "E125 continuation line does not distinguish " "itself from next logical line") @@ -880,6 +880,7 @@ def explicit_line_join(logical_line, tokens): Okay: aaa = "bbb " \\n "ccc" """ prev_start = prev_end = parens = 0 + backslash = None for token_type, text, start, end, line in tokens: if start[0] != prev_start and parens and backslash: yield backslash, "E502 the backslash is redundant between brackets" diff --git a/testsuite/E12not.py b/testsuite/E12not.py index c50f27f..b818f92 100644 --- a/testsuite/E12not.py +++ b/testsuite/E12not.py @@ -128,7 +128,7 @@ part = [-1, (2, 3, fnct(1, 2, 3, 4, 5, 6) -fnct(1, 2, 3 +fnct(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) @@ -568,14 +568,19 @@ result = some_function_that_takes_arguments('a', 'b', 'c', dica = { ('abc' 'def'): ( - 'abc'), + 'abc'), } (abcdef[0] [1]) = ( - 'abc') + 'abc') ('abc' 'def') == ( - 'abc') + 'abc') # + +# issue 214 +bar( + 1).zap( + 2) -- 1.8.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor