Skip to content

Commit 47502f7

Browse files
committed
fix(parse_result): import fields from dataclasses only once
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
1 parent 5fffbb5 commit 47502f7

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

tck/handlers/registry.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import inspect
88
from collections.abc import Callable
9-
from dataclasses import asdict
9+
from dataclasses import asdict, fields as dc_fields
1010
from typing import Any, get_type_hints
1111

1212
from tck.errors import JsonRpcError, handle_sdk_errors
@@ -86,8 +86,6 @@ def parse_result(result: Any) -> dict:
8686
8787
Fields with metadata={"nullable": True} are preserved even when None.
8888
"""
89-
from dataclasses import fields as dc_fields
90-
9189
nullable_fields: set[str] = set()
9290
for f in dc_fields(result):
9391
if f.metadata.get("nullable"):

0 commit comments

Comments
 (0)