mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-07 13:24:39 +08:00
Remove E999 for now, because those issues are not defined. Also change a few small things where issues were wrong.
This commit is contained in:
@@ -511,6 +511,8 @@ class PEP8Normalizer(Normalizer):
|
|||||||
and leaf.parent.type not in ('subscript', 'subscriptlist'):
|
and leaf.parent.type not in ('subscript', 'subscriptlist'):
|
||||||
message = "Whitespace before '%s'" % leaf.value
|
message = "Whitespace before '%s'" % leaf.value
|
||||||
add_if_spaces(203, message, spacing)
|
add_if_spaces(203, message, spacing)
|
||||||
|
elif prev == ':' and prev.parent.type in ('subscript', 'subscriptlist'):
|
||||||
|
pass # TODO
|
||||||
elif prev in (',', ';', ':'):
|
elif prev in (',', ';', ':'):
|
||||||
add_not_spaces('231', "missing whitespace after '%s'", spacing)
|
add_not_spaces('231', "missing whitespace after '%s'", spacing)
|
||||||
elif leaf == ':': # Is a subscript
|
elif leaf == ':': # Is a subscript
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ for a in 'abc':
|
|||||||
for b in 'xyz':
|
for b in 'xyz':
|
||||||
print a # indented with 8 spaces
|
print a # indented with 8 spaces
|
||||||
#: W101:0
|
#: W101:0
|
||||||
print b # indented with 1 tab
|
print(b) # indented with 1 tab
|
||||||
if True:
|
if True:
|
||||||
#: W101:0
|
#: W101:0
|
||||||
pass
|
pass
|
||||||
@@ -29,9 +29,8 @@ class TestP4Poller(unittest.TestCase):
|
|||||||
|
|
||||||
#
|
#
|
||||||
if True:
|
if True:
|
||||||
#: E101:0
|
#: E101:0 E101+1:0
|
||||||
foo(1,
|
foo(1,
|
||||||
#: E101:0
|
|
||||||
2)
|
2)
|
||||||
|
|
||||||
def test_keys(self):
|
def test_keys(self):
|
||||||
|
|||||||
@@ -26,11 +26,11 @@ assert type(res) == type((0,))
|
|||||||
#: E721:7
|
#: E721:7
|
||||||
assert type(res) == type((0))
|
assert type(res) == type((0))
|
||||||
#: E721:7
|
#: E721:7
|
||||||
assert type(res) != type((1, ))
|
assert type(res) != type((1,))
|
||||||
#: E721:7
|
#: E721:7
|
||||||
assert type(res) is type((1, ))
|
assert type(res) is type((1,))
|
||||||
#: E721:7
|
#: E721:7
|
||||||
assert type(res) is not type((1, ))
|
assert type(res) is not type((1,))
|
||||||
|
|
||||||
# Okay
|
# Okay
|
||||||
#: E402
|
#: E402
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ def collect_errors(code):
|
|||||||
code, _, add_line = code.partition('+')
|
code, _, add_line = code.partition('+')
|
||||||
l = line_nr + 1 + int(add_line or 0)
|
l = line_nr + 1 + int(add_line or 0)
|
||||||
|
|
||||||
|
if code == 'E999': continue # TODO delete
|
||||||
|
|
||||||
yield WantedIssue(code[1:], l, column)
|
yield WantedIssue(code[1:], l, column)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user