Remove OrderedDict from entity_values as dict guarantees order on newer cpython (#118081)

This commit is contained in:
J. Nick Koston 2024-05-24 17:43:20 -10:00 committed by GitHub
parent f026083712
commit 3416162fdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,7 +2,6 @@
from __future__ import annotations
from collections import OrderedDict
import fnmatch
from functools import lru_cache
import re
@ -36,9 +35,9 @@ class EntityValues:
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