Skip to content

Commit

Permalink
Remove OrderedDict from entity_values as dict guarantees order on new…
Browse files Browse the repository at this point in the history
…er cpython (#118081)
  • Loading branch information
bdraco committed May 25, 2024
1 parent f026083 commit 3416162
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions homeassistant/helpers/entity_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from __future__ import annotations

from collections import OrderedDict
import fnmatch
from functools import lru_cache
import re
Expand Down Expand Up @@ -36,9 +35,9 @@ def __init__(
if glob is None:
compiled: dict[re.Pattern[str], Any] | None = None
else:
compiled = OrderedDict()
for key, value in glob.items():
compiled[re.compile(fnmatch.translate(key))] = value
compiled = {
re.compile(fnmatch.translate(key)): value for key, value in glob.items()
}

self._glob = compiled

Expand Down

0 comments on commit 3416162

Please sign in to comment.