Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
rainwoodman committed Dec 18, 2024
1 parent ee68c04 commit 34c50f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blueair_api/intermediate_representation_aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def parse_json[T](kls: type[T], jsonobj: MappingType) -> dict[str, T]:

for key, value in jsonobj.items():
if not isinstance(value, dict):
raise ValueError("expecting mapping value to be dict.")
raise TypeError("expecting mapping value to be dict.")
extra_fields = dict(value) # make extra_fields copy.
kwargs : dict[str, Any] = {}
for field in fields:
Expand Down Expand Up @@ -140,7 +140,7 @@ def __init__(self, stream: Iterable[MappingType]):
ru = None
rv : float | bool | str | bytes
for label, value in record.items():
assert isinstance(value, (str, int, float, bool))
assert isinstance(value, str | int | float | bool)
match label:
case 'bn' | 'bt' | 'bu' | 'bv' | 'bs' | 'bver':
raise ValueError("TODO: base fields not supported. c.f. RFC8428, 4.1")
Expand Down

0 comments on commit 34c50f1

Please sign in to comment.