Set colorization enabled by default (fixes default colorization enabling through script instead of CLI)

pull/159/head
David Pokora 6 years ago
parent 072cc152d1
commit 9e4e37ccc3
No known key found for this signature in database
GPG Key ID: 3CED48D1BB21BDD7
  1. 6
      slither/utils/colors.py

@ -3,7 +3,7 @@ import platform
class Colors: class Colors:
COLORIZATION_ENABLED = False COLORIZATION_ENABLED = True
RED = '\033[91m' RED = '\033[91m'
GREEN = '\033[92m' GREEN = '\033[92m'
YELLOW = '\033[93m' YELLOW = '\033[93m'
@ -80,3 +80,7 @@ yellow = partial(colorize, Colors.YELLOW)
red = partial(colorize, Colors.RED) red = partial(colorize, Colors.RED)
blue = partial(colorize, Colors.BLUE) blue = partial(colorize, Colors.BLUE)
magenta = partial(colorize, Colors.MAGENTA) magenta = partial(colorize, Colors.MAGENTA)
# We enable colorization by default (this call is important as it will enable color mode on Windows by default),
# regardless of whether Slither is interacted with from CLI or another script.
set_colorization_enabled(True)

Loading…
Cancel
Save