summaryrefslogtreecommitdiff
path: root/pycodestyle.py
diff options
context:
space:
mode:
Diffstat (limited to 'pycodestyle.py')
-rwxr-xr-xpycodestyle.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py
index 094e24f..766e6bd 100755
--- a/pycodestyle.py
+++ b/pycodestyle.py
@@ -207,7 +207,7 @@ def tabs_or_spaces(physical_line, indent_char):
tabs and spaces. When using -tt these warnings become errors.
These options are highly recommended!
- Okay: if a == 0:\n a = 1\n b = 1
+ Okay: if a == 0:\n a = 1\n b = 1
E101: if a == 0:\n a = 1\n\tb = 1
"""
indent = INDENT_REGEX.match(physical_line).group(1)
@@ -534,6 +534,10 @@ def indentation(logical_line, previous_logical, indent_char,
elif not indent_expect and indent_level > previous_indent_level:
yield 0, tmpl % (3 + c, "unexpected indentation")
+ expected_indent_level = previous_indent_level + 4
+ if indent_expect and indent_level > expected_indent_level:
+ yield 0, tmpl % (7, 'over-indented')
+
@register_check
def continued_indentation(logical_line, tokens, indent_level, hang_closing,