Skip to content

Commit

Permalink
Bump mypy from 1.11.2 to 1.13.0 (#936)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
  • Loading branch information
dependabot[bot] and marcelveldt authored Nov 25, 2024
1 parent ba8947e commit 839e233
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ test = [
"aioresponses==0.7.7",
"codespell==2.3.0",
"isort==5.13.2",
"mypy==1.11.2",
"mypy==1.13.0",
"pre-commit==4.0.1",
"pre-commit-hooks==5.0.0",
"pylint==3.3.1",
Expand Down

0 comments on commit 839e233

Please sign in to comment.