Skip to content

Commit

Permalink
Fix raise-within-try in language util (home-assistant#123354)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Aug 8, 2024
1 parent ddc9403 commit b498c89
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions homeassistant/util/language.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ def score(
region_idx = pref_regions.index(self.region)
elif dialect.region is not None:
region_idx = pref_regions.index(dialect.region)
else:
# Can't happen, but mypy is not smart enough
raise ValueError

# More preferred regions are at the front.
# Add 1 to boost above a weak match where no regions are set.
Expand Down

0 comments on commit b498c89

Please sign in to comment.