Fixed E203 flake8 errors

whitespace before ‘:’
This commit is contained in:
Andras Tim 2017-07-17 01:25:08 +02:00
parent ba0a4d0b2e
commit ebb6d0650b
2 changed files with 10 additions and 10 deletions

View File

@ -118,12 +118,12 @@ class TestAssertionRewrite(object):
def f(): def f():
assert a_global # noqa assert a_global # noqa
assert getmsg(f, {"a_global" : False}) == "assert False" assert getmsg(f, {"a_global": False}) == "assert False"
def f(): def f():
assert sys == 42 assert sys == 42
assert getmsg(f, {"sys" : sys}) == "assert sys == 42" assert getmsg(f, {"sys": sys}) == "assert sys == 42"
def f(): def f():
assert cls == 42 # noqa assert cls == 42 # noqa
@ -131,7 +131,7 @@ class TestAssertionRewrite(object):
class X(object): class X(object):
pass pass
assert getmsg(f, {"cls" : X}) == "assert cls == 42" assert getmsg(f, {"cls": X}) == "assert cls == 42"
def test_assert_already_has_message(self): def test_assert_already_has_message(self):
def f(): def f():
@ -238,13 +238,13 @@ class TestAssertionRewrite(object):
def f(): def f():
assert x() and x() assert x() and x()
assert getmsg(f, {"x" : x}) == """assert (False) assert getmsg(f, {"x": x}) == """assert (False)
+ where False = x()""" + where False = x()"""
def f(): def f():
assert False or x() assert False or x()
assert getmsg(f, {"x" : x}) == """assert (False or False) assert getmsg(f, {"x": x}) == """assert (False or False)
+ where False = x()""" + where False = x()"""
def f(): def f():
@ -255,7 +255,7 @@ class TestAssertionRewrite(object):
def f(): def f():
x = 1 x = 1
y = 2 y = 2
assert x in {1 : None} and y in {} assert x in {1: None} and y in {}
assert getmsg(f) == "assert (1 in {1: None} and 2 in {})" assert getmsg(f) == "assert (1 in {1: None} and 2 in {})"
@ -348,7 +348,7 @@ class TestAssertionRewrite(object):
def g(a=42, *args, **kwargs): def g(a=42, *args, **kwargs):
return False return False
ns = {"g" : g} ns = {"g": g}
def f(): def f():
assert g() assert g()
@ -389,7 +389,7 @@ class TestAssertionRewrite(object):
def f(): def f():
x = "a" x = "a"
assert g(**{x : 2}) assert g(**{x: 2})
assert getmsg(f, ns) == """assert False assert getmsg(f, ns) == """assert False
+ where False = g(**{'a': 2})""" + where False = g(**{'a': 2})"""
@ -398,7 +398,7 @@ class TestAssertionRewrite(object):
class X(object): class X(object):
g = 3 g = 3
ns = {"x" : X} ns = {"x": X}
def f(): def f():
assert not x.g # noqa assert not x.g # noqa

View File

@ -196,6 +196,6 @@ filterwarnings =
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
[flake8] [flake8]
ignore = E203,E221,E222,E225,E226,E231,E241,E251,E261,E262,E265,E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731 ignore = E221,E222,E225,E226,E231,E241,E251,E261,E262,E265,E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731
max-line-length = 120 max-line-length = 120
exclude = _pytest/vendored_packages/pluggy.py exclude = _pytest/vendored_packages/pluggy.py