mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Fix raise-within-try in language util (#123354)
This commit is contained in:
parent
ddc94030a6
commit
b498c89860
@ -137,9 +137,6 @@ class Dialect:
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user