How to use the dotbot.messenger.color.Color.BLUE function in dotbot

To help you get started, we’ve selected a few dotbot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github anishathalye / dotbot / dotbot / messenger / messenger.py View on Github external
def _color(self, level):
        '''
        Get a color (terminal escape sequence) according to a level.
        '''
        if not self._should_use_color():
            return ''
        elif level < Level.DEBUG:
            return ''
        elif Level.DEBUG <= level < Level.LOWINFO:
            return Color.YELLOW
        elif Level.LOWINFO <= level < Level.INFO:
            return Color.BLUE
        elif Level.INFO <= level < Level.WARNING:
            return Color.GREEN
        elif Level.WARNING <= level < Level.ERROR:
            return Color.MAGENTA
        elif Level.ERROR <= level:
            return Color.RED