diff --git a/trinity/common/constants.py b/trinity/common/constants.py index 860cd39027..5eaa3b58ff 100644 --- a/trinity/common/constants.py +++ b/trinity/common/constants.py @@ -23,6 +23,9 @@ def __getattr__(cls, name): return cls[name.upper()] return super().__getattr__(name) + def __call__(cls, value, *args, **kwargs): + return super().__call__(value.lower(), *args, **kwargs) + class CaseInsensitiveEnum(Enum, metaclass=CaseInsensitiveEnumMeta): pass @@ -47,11 +50,11 @@ class ReadStrategy(CaseInsensitiveEnum): """Pop Strategy.""" DEFAULT = None - FIFO = "FIFO" - RANDOM = "RANDOM" - LRU = "LRU" - LFU = "LFU" - PRIORITY = "PRIORITY" + FIFO = "fifo" + RANDOM = "random" + LRU = "lru" + LFU = "lfu" + PRIORITY = "priority" class StorageType(CaseInsensitiveEnum):