mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-06 04:44:29 +08:00
Fixed 231 issues.
This commit is contained in:
@@ -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 \
|
||||
|
||||
16
test/normalizer_issue_files/E23.py
Normal file
16
test/normalizer_issue_files/E23.py
Normal 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',
|
||||
}
|
||||
Reference in New Issue
Block a user