Skip to content

Commit 90b1c93

Browse files
authored
Merge pull request #9585 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 4b1d909 + 9d2ffe2 commit 90b1c93

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 21.12b0
3+
rev: 22.1.0
44
hooks:
55
- id: black
66
args: [--safe, --quiet]
77
- repo: https://github.com/asottile/blacken-docs
8-
rev: v1.12.0
8+
rev: v1.12.1
99
hooks:
1010
- id: blacken-docs
1111
additional_dependencies: [black==20.8b1]
@@ -29,7 +29,7 @@ repos:
2929
- flake8-typing-imports==1.12.0
3030
- flake8-docstrings==1.5.0
3131
- repo: https://github.com/asottile/reorder_python_imports
32-
rev: v2.6.0
32+
rev: v2.7.1
3333
hooks:
3434
- id: reorder-python-imports
3535
args: ['--application-directories=.:src', --py37-plus]

src/_pytest/doctest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ def _remove_unwanted_precision(self, want: str, got: str) -> str:
656656
precision = 0 if fraction is None else len(fraction)
657657
if exponent is not None:
658658
precision -= int(exponent)
659-
if float(w.group()) == approx(float(g.group()), abs=10 ** -precision):
659+
if float(w.group()) == approx(float(g.group()), abs=10**-precision):
660660
# They're close enough. Replace the text we actually
661661
# got with the text we want, so that it will match when we
662662
# check the string literally.

testing/io/test_terminalwriter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_terminalwriter_not_unicode() -> None:
5656
file = io.TextIOWrapper(buffer, encoding="cp1252")
5757
tw = terminalwriter.TerminalWriter(file)
5858
tw.write("hello 🌀 wôrld אבג", flush=True)
59-
assert buffer.getvalue() == br"hello \U0001f300 w\xf4rld \u05d0\u05d1\u05d2"
59+
assert buffer.getvalue() == rb"hello \U0001f300 w\xf4rld \u05d0\u05d1\u05d2"
6060

6161

6262
win32 = int(sys.platform == "win32")

testing/python/approx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ def test_foo():
771771
def test_expected_value_type_error(self, x, name):
772772
with pytest.raises(
773773
TypeError,
774-
match=fr"pytest.approx\(\) does not support nested {name}:",
774+
match=rf"pytest.approx\(\) does not support nested {name}:",
775775
):
776776
approx(x)
777777

testing/test_assertrewrite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ def test_simple_failure():
13131313

13141314

13151315
@pytest.mark.skipif(
1316-
sys.maxsize <= (2 ** 31 - 1), reason="Causes OverflowError on 32bit systems"
1316+
sys.maxsize <= (2**31 - 1), reason="Causes OverflowError on 32bit systems"
13171317
)
13181318
@pytest.mark.parametrize("offset", [-1, +1])
13191319
def test_source_mtime_long_long(pytester: Pytester, offset) -> None:
@@ -1332,7 +1332,7 @@ def test(): pass
13321332
# use unsigned long timestamp which overflows signed long,
13331333
# which was the cause of the bug
13341334
# +1 offset also tests masking of 0xFFFFFFFF
1335-
timestamp = 2 ** 32 + offset
1335+
timestamp = 2**32 + offset
13361336
os.utime(str(p), (timestamp, timestamp))
13371337
result = pytester.runpytest()
13381338
assert result.ret == 0

0 commit comments

Comments
 (0)