From da2e092163eb1c595fa286af0d801a9682f877a4 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Fri, 12 Apr 2019 04:52:47 -0700 Subject: [PATCH] pre-commit autoupdate --- .pre-commit-config.yaml | 14 +++++++------- bench/bench_argcomplete.py | 2 +- src/_pytest/fixtures.py | 4 +++- src/_pytest/pytester.py | 2 +- testing/python/fixtures.py | 4 +--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 36ecf79b8..737c6b86b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,16 @@ exclude: doc/en/example/py2py3/test_py2.py repos: - repo: https://github.com/ambv/black - rev: 18.9b0 + rev: 19.3b0 hooks: - id: black args: [--safe, --quiet] language_version: python3 - repo: https://github.com/asottile/blacken-docs - rev: v0.3.0 + rev: v0.5.0 hooks: - id: blacken-docs - additional_dependencies: [black==18.9b0] + additional_dependencies: [black==19.3b0] language_version: python3 - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.1.0 @@ -22,22 +22,22 @@ repos: exclude: _pytest/debugging.py language_version: python3 - repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.0 + rev: 3.7.7 hooks: - id: flake8 language_version: python3 - repo: https://github.com/asottile/reorder_python_imports - rev: v1.3.5 + rev: v1.4.0 hooks: - id: reorder-python-imports args: ['--application-directories=.:src'] - repo: https://github.com/asottile/pyupgrade - rev: v1.11.1 + rev: v1.15.0 hooks: - id: pyupgrade args: [--keep-percent-format] - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.2.0 + rev: v1.3.0 hooks: - id: rst-backticks - repo: local diff --git a/bench/bench_argcomplete.py b/bench/bench_argcomplete.py index 2b30add08..335733df7 100644 --- a/bench/bench_argcomplete.py +++ b/bench/bench_argcomplete.py @@ -16,4 +16,4 @@ run = 'fc("/d")' if __name__ == "__main__": print(timeit.timeit(run, setup=setup % imports[0], number=count)) - print((timeit.timeit(run, setup=setup % imports[1], number=count))) + print(timeit.timeit(run, setup=setup % imports[1], number=count)) diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index 0bb525a45..f16561267 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -853,7 +853,9 @@ class FixtureDef(object): exceptions.append(sys.exc_info()) if exceptions: e = exceptions[0] - del exceptions # ensure we don't keep all frames alive because of the traceback + del ( + exceptions + ) # ensure we don't keep all frames alive because of the traceback six.reraise(*e) finally: diff --git a/src/_pytest/pytester.py b/src/_pytest/pytester.py index 31cea5923..131876910 100644 --- a/src/_pytest/pytester.py +++ b/src/_pytest/pytester.py @@ -1320,7 +1320,7 @@ class LineMatcher(object): raise ValueError("line %r not found in output" % fnline) def _log(self, *args): - self._log_output.append(" ".join((str(x) for x in args))) + self._log_output.append(" ".join(str(x) for x in args)) @property def _log_text(self): diff --git a/testing/python/fixtures.py b/testing/python/fixtures.py index d67d6f4a2..f3393cf65 100644 --- a/testing/python/fixtures.py +++ b/testing/python/fixtures.py @@ -1071,9 +1071,7 @@ class TestFixtureUsages(object): ) result = testdir.runpytest_inprocess() result.stdout.fnmatch_lines( - ( - "*Fixture 'badscope' from test_invalid_scope.py got an unexpected scope value 'functions'" - ) + "*Fixture 'badscope' from test_invalid_scope.py got an unexpected scope value 'functions'" ) def test_funcarg_parametrized_and_used_twice(self, testdir):