Fixed flake8 warnings
W191 indentation contains tabs W292 no newline at end of file W293 blank line contains whitespace W391 blank line at end of file
This commit is contained in:
parent
796ffa5123
commit
6af2abdb53
|
@ -410,5 +410,3 @@ def getstatementrange_old(lineno, source, assertion=False):
|
|||
if trysource.isparseable():
|
||||
return start, end
|
||||
raise SyntaxError("no valid source range around line %d " % (lineno,))
|
||||
|
||||
|
||||
|
|
|
@ -1126,4 +1126,3 @@ class FixtureManager:
|
|||
for fixturedef in fixturedefs:
|
||||
if nodeid.startswith(fixturedef.baseid):
|
||||
yield fixturedef
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ def test_getstartingblock_multiline():
|
|||
self.source = _pytest._code.Frame(frame).statement
|
||||
|
||||
x = A('x',
|
||||
'y' \
|
||||
'y'
|
||||
,
|
||||
'z')
|
||||
|
||||
|
@ -400,6 +400,7 @@ def test_source_of_class_at_eof_without_newline(tmpdir):
|
|||
s2 = _pytest._code.Source(tmpdir.join("a.py").pyimport().A)
|
||||
assert str(source).strip() == str(s2).strip()
|
||||
|
||||
|
||||
if True:
|
||||
def x():
|
||||
pass
|
||||
|
@ -462,6 +463,7 @@ def test_getfslineno():
|
|||
assert lineno == A_lineno
|
||||
|
||||
assert getfslineno(3) == ("", -1)
|
||||
|
||||
class B(object):
|
||||
pass
|
||||
B.__name__ = "B2"
|
||||
|
@ -471,6 +473,7 @@ def test_code_of_object_instance_with_call():
|
|||
class A(object):
|
||||
pass
|
||||
pytest.raises(TypeError, lambda: _pytest._code.Source(A()))
|
||||
|
||||
class WithCall(object):
|
||||
def __call__(self):
|
||||
pass
|
||||
|
|
|
@ -10,4 +10,3 @@ if __name__ == '__main__':
|
|||
hidden.extend(['--hidden-import', x])
|
||||
args = ['pyinstaller', '--noconfirm'] + hidden + ['runtests_script.py']
|
||||
subprocess.check_call(' '.join(args), shell=True)
|
||||
|
||||
|
|
|
@ -309,4 +309,3 @@ class TestApprox(object):
|
|||
'*At index 0 diff: 3 != 4 * {0}'.format(expected),
|
||||
'=* 1 failed in *=',
|
||||
])
|
||||
|
||||
|
|
|
@ -3026,6 +3026,3 @@ class TestParameterizedSubRequest(object):
|
|||
E*{1}:5
|
||||
*1 failed*
|
||||
""".format(fixfile.strpath, testfile.basename))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -826,4 +826,3 @@ class TestOverrideIniArgs(object):
|
|||
rootdir, inifile, inicfg = determine_setup(None, ['a/exist'])
|
||||
assert rootdir == tmpdir
|
||||
assert inifile is None
|
||||
|
||||
|
|
|
@ -932,4 +932,3 @@ class TestDoctestReportingOption(object):
|
|||
result.stderr.fnmatch_lines([
|
||||
"*error: argument --doctest-report: invalid choice: 'obviously_invalid_format' (choose from*"
|
||||
])
|
||||
|
||||
|
|
|
@ -1057,4 +1057,3 @@ def test_set_suite_name(testdir, suite_name):
|
|||
assert result.ret == 0
|
||||
node = dom.find_first_by_tag("testsuite")
|
||||
node.assert_attr(name=expected)
|
||||
|
||||
|
|
|
@ -114,5 +114,3 @@ class TestPaste(object):
|
|||
assert 'lexer=%s' % lexer in data.decode()
|
||||
assert 'code=full-paste-contents' in data.decode()
|
||||
assert 'expiry=1week' in data.decode()
|
||||
|
||||
|
||||
|
|
|
@ -224,5 +224,3 @@ def test_failure_issue380(testdir):
|
|||
""")
|
||||
result = testdir.runpytest("--resultlog=log")
|
||||
assert result.ret == 2
|
||||
|
||||
|
||||
|
|
|
@ -754,5 +754,3 @@ class TestReportContents(object):
|
|||
rep = reports[1]
|
||||
assert rep.capstdout == ''
|
||||
assert rep.capstderr == ''
|
||||
|
||||
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -196,6 +196,6 @@ filterwarnings =
|
|||
ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning
|
||||
|
||||
[flake8]
|
||||
ignore = E101,E111,E113,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E201,E202,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,W191,W292,W293,W391
|
||||
ignore = E101,E111,E113,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E201,E202,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
|
||||
max-line-length = 120
|
||||
exclude = _pytest/vendored_packages/pluggy.py
|
||||
|
|
Loading…
Reference in New Issue