key formatting

This commit is contained in:
InspectorCaracal 2022-04-07 17:05:34 -06:00 committed by GitHub
parent 3d94fab1f5
commit 60ee5e01e8

View file

@ -319,7 +319,7 @@ def regex_tuple_from_key_alias(obj):
"""
global _REGEX_TUPLE_CACHE
permutation_string = " ".join([obj.key] + obj.aliases.all())
cache_key = " ".join((obj.id, permutation_string))
cache_key = f"{obj.id} {permutation_string}"
if cache_key not in _REGEX_TUPLE_CACHE:
_REGEX_TUPLE_CACHE[cache_key] = (