Skip to content

Commit

Permalink
Improve repair typing
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Nov 11, 2024
1 parent dae9cac commit 717fd57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/battery_notes/repairs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class MissingDeviceRepairFlow(RepairsFlow):
"""Handler for an issue fixing flow."""

def __init__(self, data: dict[str, str]) -> None:
def __init__(self, data: dict[str, str | int | float | None] | None) -> None:
"""Initialize."""
self.entry_id = data["entry_id"]
self.device_id = data["device_id"]
Expand Down Expand Up @@ -55,3 +55,4 @@ async def async_create_fix_flow(
if issue_id.startswith("missing_device_"):
assert data
return MissingDeviceRepairFlow(data)
raise ValueError(f"unknown repair {issue_id}")

0 comments on commit 717fd57

Please sign in to comment.