From 9c0e05c615b1eb96262c2ec2e98fb4c0a34b7201 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 17 Feb 2022 07:12:29 +0000 Subject: [PATCH] :rotating_light: auto fix by pre-commit hooks --- tests/test_utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index d8936090..66f8b1ee 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,4 +1,5 @@ import json + from utils import make_fake_message @@ -9,10 +10,10 @@ def test_dataclass_encoder(): ms = MessageSegment.node_custom( "1234", "testtest", "test" + MessageSegment.image("url") ) - s = json.dumps(ms, cls = DataclassEncoder) + s = json.dumps(ms, cls=DataclassEncoder) assert ( s == '{"type": "node", "data": {"user_id": "1234", "nickname": "testtest", "content": [{"type": "text", "data": {"text": "test"}}, {"type": "image", "data": {"url": "url"}}]}}' ) - s1 = json.dumps("123", cls = DataclassEncoder) - assert s1 == '"123"' \ No newline at end of file + s1 = json.dumps("123", cls=DataclassEncoder) + assert s1 == '"123"'