We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a71c1b6 commit fefbbeeCopy full SHA for fefbbee
trinity/common/constants.py
@@ -23,6 +23,9 @@ def __getattr__(cls, name):
23
return cls[name.upper()]
24
return super().__getattr__(name)
25
26
+ def __call__(cls, value, *args, **kwargs):
27
+ return super().__call__(value.lower(), *args, **kwargs)
28
+
29
30
class CaseInsensitiveEnum(Enum, metaclass=CaseInsensitiveEnumMeta):
31
pass
@@ -47,11 +50,11 @@ class ReadStrategy(CaseInsensitiveEnum):
47
50
"""Pop Strategy."""
48
51
49
52
DEFAULT = None
- FIFO = "FIFO"
- RANDOM = "RANDOM"
- LRU = "LRU"
53
- LFU = "LFU"
54
- PRIORITY = "PRIORITY"
+ FIFO = "fifo"
+ RANDOM = "random"
55
+ LRU = "lru"
56
+ LFU = "lfu"
57
+ PRIORITY = "priority"
58
59
60
class StorageType(CaseInsensitiveEnum):
0 commit comments