Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Nov 25, 2024
1 parent 9d96f78 commit 0be24b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions matter_server/common/helpers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def parse_value(
value = None

if is_dataclass(value_type) and isinstance(value, dict):
return dataclass_from_dict(value_type, value)
return dataclass_from_dict(value_type, value) # type: ignore[arg-type]
# get origin value type and inspect one-by-one
origin: Any = get_origin(value_type)
if origin in (list, tuple, set) and isinstance(value, (list, tuple, set)):
Expand Down Expand Up @@ -267,7 +267,10 @@ def parse_value(


def dataclass_from_dict(
cls: type[_T], dict_obj: dict, strict: bool = False, allow_sdk_types: bool = False
cls: type[_T],
dict_obj: dict,
strict: bool = False,
allow_sdk_types: bool = False,
) -> _T:
"""
Create (instance of) a dataclass by providing a dict with values.
Expand Down

0 comments on commit 0be24b1

Please sign in to comment.