[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-06-20 13:24:25 +00:00
parent f988bc41d8
commit 9d24ef71ef
1 changed files with 3 additions and 1 deletions

View File

@ -376,7 +376,9 @@ class ApproxSequenceLike(ApproxBase):
def _check_type(self) -> None:
__tracebackhide__ = True
for index, x in enumerate(self.expected):
if (isinstance(x, Collection) or isinstance(x, Mapping)) and not isinstance(x, str):
if (isinstance(x, Collection) or isinstance(x, Mapping)) and not isinstance(
x, str
):
msg = "pytest.approx() does not support nested data structures: {!r} at index {}\n full sequence: {}"
raise TypeError(msg.format(x, index, pprint.pformat(self.expected)))