Skip to content

Commit 8393fdd

Browse files
Merge pull request #4089 from asottile/upgrade_hooks
Upgrade pre-commit hooks
2 parents e8c10d4 + 65545d8 commit 8393fdd

18 files changed

Lines changed: 29 additions & 35 deletions

File tree

.pre-commit-config.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
exclude: doc/en/example/py2py3/test_py2.py
22
repos:
33
- repo: https://github.com/ambv/black
4-
rev: 18.6b4
4+
rev: 18.9b0
55
hooks:
66
- id: black
77
args: [--safe, --quiet]
88
language_version: python3
99
- repo: https://github.com/asottile/blacken-docs
10-
rev: v0.2.0
10+
rev: v0.3.0
1111
hooks:
1212
- id: blacken-docs
13-
additional_dependencies: [black==18.6b4]
13+
additional_dependencies: [black==18.9b0]
1414
language_version: python3
1515
- repo: https://github.com/pre-commit/pre-commit-hooks
16-
rev: v1.3.0
16+
rev: v1.4.0-1
1717
hooks:
1818
- id: trailing-whitespace
1919
- id: end-of-file-fixer
@@ -22,11 +22,12 @@ repos:
2222
exclude: _pytest/debugging.py
2323
- id: flake8
2424
- repo: https://github.com/asottile/pyupgrade
25-
rev: v1.2.0
25+
rev: v1.8.0
2626
hooks:
27-
- id: pyupgrade
27+
- id: pyupgrade
28+
args: [--keep-percent-format]
2829
- repo: https://github.com/pre-commit/pygrep-hooks
29-
rev: v1.0.0
30+
rev: v1.1.0
3031
hooks:
3132
- id: rst-backticks
3233
- repo: local

bench/bench_argcomplete.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
# 10000 iterations, just for relative comparison
42
# 2.7.5 3.3.2
53
# FilesCompleter 75.1109 69.2116

bench/manyparam.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import pytest
32

43

doc/en/example/assertion/failure_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ class A(object):
245245
a = 1
246246

247247
b = 2
248-
assert (
249-
A.a == b
250-
), "A.a appears not to be b\n" "or does not appear to be b\none of those"
248+
assert A.a == b, (
249+
"A.a appears not to be b\n" "or does not appear to be b\none of those"
250+
)
251251

252252
def test_custom_repr(self):
253253
class JSON(object):

doc/en/example/assertion/global_testmodule_config/test_hello_world.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
hello = "world"
32

43

doc/en/example/assertion/test_failures.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import py
32

43
failure_demo = py.path.local(__file__).dirpath("failure_demo.py")

doc/en/example/costlysetup/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import pytest
32

43

src/_pytest/_argcomplete.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
"""allow bash-completion for argparse with argcomplete if installed
32
needs argcomplete>=0.5.6 for python 3.2/3.3 (older versions fail
43
to find the magic string, so _ARGCOMPLETE env. var is never set, and

src/_pytest/config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def _importconftest(self, conftestpath):
423423
and not self._using_pyargs
424424
):
425425
from _pytest.deprecated import (
426-
PYTEST_PLUGINS_FROM_NON_TOP_LEVEL_CONFTEST
426+
PYTEST_PLUGINS_FROM_NON_TOP_LEVEL_CONFTEST,
427427
)
428428

429429
warnings.warn_explicit(

src/_pytest/junitxml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Junit(py.xml.Namespace):
3838
# this dynamically instead of hardcoding it. The spec range of valid
3939
# chars is: Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
4040
# | [#x10000-#x10FFFF]
41-
_legal_chars = (0x09, 0x0A, 0x0d)
41+
_legal_chars = (0x09, 0x0A, 0x0D)
4242
_legal_ranges = ((0x20, 0x7E), (0x80, 0xD7FF), (0xE000, 0xFFFD), (0x10000, 0x10FFFF))
4343
_legal_xml_re = [
4444
unicode("%s-%s") % (unichr(low), unichr(high))

0 commit comments

Comments
 (0)