diff options
Diffstat (limited to '')
| -rw-r--r-- | bot/constants.py | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/constants.py b/bot/constants.py index a4c65a1f8..3ecdb5b35 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -186,6 +186,10 @@ class YAMLGetter(type):      def __getitem__(cls, name):          return cls.__getattr__(name) +    def __iter__(cls): +        """Returns iterator of key: value pairs of current constants class.""" +        return iter(_CONFIG_YAML[cls.section][cls.subsection].items()) +  # Dataclasses  class Bot(metaclass=YAMLGetter):  |