From 3fabc4d21918a0927a1717e2616862400bde5440 Mon Sep 17 00:00:00 2001 From: Andras Tim Date: Mon, 17 Jul 2017 01:25:08 +0200 Subject: [PATCH] Fixed E222 flake8 errors multiple spaces after operator --- _pytest/_code/code.py | 4 ++-- _pytest/_code/source.py | 2 +- _pytest/config.py | 2 +- _pytest/fixtures.py | 8 ++++---- testing/test_collection.py | 6 +++--- tox.ini | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/_pytest/_code/code.py b/_pytest/_code/code.py index 54258cc1f..c964d2beb 100644 --- a/_pytest/_code/code.py +++ b/_pytest/_code/code.py @@ -582,7 +582,7 @@ class FormattedExcinfo(object): filelocrepr = ReprFileLocation(path, entry.lineno+1, message) localsrepr = None if not short: - localsrepr = self.repr_locals(entry.locals) + localsrepr = self.repr_locals(entry.locals) return ReprEntry(lines, reprargs, localsrepr, filelocrepr, style) if excinfo: lines.extend(self.get_exconly(excinfo, indent=4)) @@ -854,7 +854,7 @@ class ReprFuncArgs(TerminalRepr): if len(ns) + len(linesofar) + 2 > tw.fullwidth: if linesofar: tw.line(linesofar) - linesofar = ns + linesofar = ns else: if linesofar: linesofar += ", " + ns diff --git a/_pytest/_code/source.py b/_pytest/_code/source.py index 5c29dac46..54aaca2e9 100644 --- a/_pytest/_code/source.py +++ b/_pytest/_code/source.py @@ -87,7 +87,7 @@ class Source(object): after = Source(after) newsource = Source() lines = [(indent + line) for line in self.lines] - newsource.lines = before.lines + lines + after.lines + newsource.lines = before.lines + lines + after.lines return newsource def indent(self, indent=' ' * 4): diff --git a/_pytest/config.py b/_pytest/config.py index 2e42074a7..bfc3baa3f 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -818,7 +818,7 @@ class DropShorterLongHelpFormatter(argparse.HelpFormatter): action._formatted_action_invocation = orgstr return orgstr return_list = [] - option_map = getattr(action, 'map_long_option', {}) + option_map = getattr(action, 'map_long_option', {}) if option_map is None: option_map = {} short_long = {} diff --git a/_pytest/fixtures.py b/_pytest/fixtures.py index 7ff41d7d4..bc9a4832e 100644 --- a/_pytest/fixtures.py +++ b/_pytest/fixtures.py @@ -105,10 +105,10 @@ def add_funcarg_pseudo_fixture_def(collector, metafunc, fixturemanager): if node and argname in node._name2pseudofixturedef: arg2fixturedefs[argname] = [node._name2pseudofixturedef[argname]] else: - fixturedef = FixtureDef(fixturemanager, '', argname, - get_direct_param_fixture_func, - arg2scope[argname], - valuelist, False, False) + fixturedef = FixtureDef(fixturemanager, '', argname, + get_direct_param_fixture_func, + arg2scope[argname], + valuelist, False, False) arg2fixturedefs[argname] = [fixturedef] if node is not None: node._name2pseudofixturedef[argname] = fixturedef diff --git a/testing/test_collection.py b/testing/test_collection.py index 6dcb7eda2..834eaa300 100644 --- a/testing/test_collection.py +++ b/testing/test_collection.py @@ -347,11 +347,11 @@ class TestSession(object): assert rcol.fspath == subdir parts = rcol._parsearg(p.basename) - assert parts[0] == target + assert parts[0] == target assert len(parts) == 1 parts = rcol._parsearg(p.basename + "::test_func") - assert parts[0] == target - assert parts[1] == "test_func" + assert parts[0] == target + assert parts[1] == "test_func" assert len(parts) == 2 def test_collect_topdir(self, testdir): diff --git a/tox.ini b/tox.ini index 3f8e590c6..490c273f0 100644 --- a/tox.ini +++ b/tox.ini @@ -196,6 +196,6 @@ filterwarnings = ignore:.*inspect.getargspec.*deprecated, use inspect.signature.*:DeprecationWarning [flake8] -ignore = E222,E225,E226,E231,E241,E251,E261,E262,E265,E271,E272,E293,E301,E302,E303,E401,E402,E501,E701,E702,E704,E712,E731 +ignore = 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