Skip to content

Commit 4d0de24

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 17d0bfc commit 4d0de24

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

changelog.d/1577.change.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
`astuple()` now applies its *filter* callable to attrs instances that are nested inside dict values.
1+
`astuple()` now applies its *filter* callable to attrs instances that are nested inside dict values.

tests/test_converters.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,9 @@ def test_falsy(self):
365365
assert not to_bool("no")
366366
assert not to_bool("off")
367367

368-
@pytest.mark.parametrize("value", [b"true", b"t", b"yes", b"y", b"on", b"1"])
368+
@pytest.mark.parametrize(
369+
"value", [b"true", b"t", b"yes", b"y", b"on", b"1"]
370+
)
369371
def test_truthy_bytes(self, value):
370372
"""
371373
Bytes values that decode to a truthy keyword match the str truthy path.
@@ -386,8 +388,10 @@ def test_bytes_are_lowercased(self, value):
386388
"""
387389
Bytes inputs follow the same case-insensitive lookup as str inputs.
388390
"""
389-
assert to_bool(value) is bool(value.decode("ascii").lower() in
390-
{"true", "t", "yes", "y", "on", "1"})
391+
assert to_bool(value) is bool(
392+
value.decode("ascii").lower()
393+
in {"true", "t", "yes", "y", "on", "1"}
394+
)
391395

392396
def test_bytearray_truthy(self):
393397
"""

tests/test_funcs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,9 @@ def test_dicts_retain_type(self, container, C):
426426
C(1, container({"a": C(4, 5)})), retain_collection_types=True
427427
)
428428

429-
@pytest.mark.parametrize("container", MAPPING_TYPES, ids=lambda c: c.__name__)
429+
@pytest.mark.parametrize(
430+
"container", MAPPING_TYPES, ids=lambda c: c.__name__
431+
)
430432
def test_dicts_filter_applies_to_values(self, container, C):
431433
"""
432434
astuple's *filter* is applied to attrs instances nested as dict

0 commit comments

Comments
 (0)