Skip to content

Commit

Permalink
Minor type fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dermotduffy committed Jan 28, 2023
1 parent 49986de commit 2c23bbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/frigate/media_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,9 @@ def get_integration_proxy_path(self) -> str:

def get_changes_to_set_next_empty(self, data: str) -> dict[str, str]:
"""Get the changes that would set the next attribute in the hierarchy."""
for attribute in self.__attrs_attrs__: # type: ignore[attr-defined]
if getattr(self, attribute.name) is None:
return {attribute.name: data}
for attribute in self.__attrs_attrs__:
if getattr(self, attribute.name) is None: # type: ignore[attr-defined]
return {attribute.name: data} # type: ignore[attr-defined]
raise ValueError("No empty attribute available")

@property
Expand Down

0 comments on commit 2c23bbe

Please sign in to comment.