mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-20 18:14:44 +08:00
Add E211.
This commit is contained in:
@@ -348,6 +348,9 @@ class PEP8Normalizer(Normalizer):
|
||||
and leaf.parent.type not in ('subscript', 'subscriptlist'):
|
||||
message = "Whitespace before '%s'" % leaf.value
|
||||
self.add_issue(203, message, info.indentation_part)
|
||||
elif leaf in _OPENING_BRACKETS:
|
||||
message = "Whitespace before '%s'" % leaf.value
|
||||
self.add_issue(211, message, info.indentation_part)
|
||||
elif self._previous_leaf in _OPENING_BRACKETS:
|
||||
message = "Whitespace after '%s'" % leaf.value
|
||||
self.add_issue(201, message, info.indentation_part)
|
||||
|
||||
16
test/normalizer_issue_files/E21.py
Normal file
16
test/normalizer_issue_files/E21.py
Normal file
@@ -0,0 +1,16 @@
|
||||
#: E211:4
|
||||
spam (1)
|
||||
#: E211:4 E211:19
|
||||
dict ['key'] = list [index]
|
||||
#: E211:11
|
||||
dict['key'] ['subkey'] = list[index]
|
||||
# Okay
|
||||
spam(1)
|
||||
dict['key'] = list[index]
|
||||
|
||||
|
||||
# This is not prohibited by PEP8, but avoid it.
|
||||
# Dave: I think this is extremely stupid. Use the same convention everywhere.
|
||||
#: E211:9
|
||||
class Foo (Bar, Baz):
|
||||
pass
|
||||
Reference in New Issue
Block a user