Fixed 231 issues.

This commit is contained in:
Dave Halter
2017-06-28 10:28:27 +02:00
parent 367a75d2c8
commit 31fd7c335f
2 changed files with 18 additions and 3 deletions

View File

@@ -474,10 +474,9 @@ class PEP8Normalizer(Normalizer):
and leaf.parent.type not in ('subscript', 'subscriptlist'):
message = "Whitespace before '%s'" % leaf.value
add_if_spaces(203, message, info.indentation_part)
elif leaf == ':': # Is a subscript
# TODO
pass
elif prev in (',', ';', ':'):
add_not_spaces('231', "missing whitespace after '%s'", info.indentation_part)
elif leaf == ':': # Is a subscript
# TODO
pass
elif leaf in ('*', '**') and leaf.parent.type not in _NON_STAR_TYPES \

View File

@@ -0,0 +1,16 @@
#: E231:7
a = (1,2)
#: E231:5
a[b1,:]
#: E231:10
a = [{'a':''}]
# Okay
a = (4,)
#: E202:7
b = (5, )
c = {'text': text[5:]}
result = {
'key1': 'value',
'key2': 'value',
}