Syntax highlighting for dis module

  1. Theme was updated.

Dark:

Light:

  1. Tested color customization option as well:

Contents of ~/.pythonstartup(PYTHONSTARTUP):

try:
    from dataclasses import replace
    from _colorize import ANSIColors, default_theme, set_theme
except ImportError:
    pass
else:
    print("Replacing theme ...")
    theme = default_theme.copy_with(
        dis=replace(
            default_theme.dis,
            label_bg=ANSIColors.BOLD_GREEN,
            label_fg=ANSIColors.BLACK,
            exception_label=ANSIColors.BOLD_GREEN,
            argument_detail=ANSIColors.BOLD_GREEN,
            op_load=ANSIColors.BOLD_GREEN,
            op_pop=ANSIColors.BOLD_YELLOW,
            op_call_return=ANSIColors.BOLD_MAGENTA,
            op_control_flow=ANSIColors.BOLD_CYAN,
            reset=ANSIColors.RESET,
        ),
    )
    set_theme(theme)
1 Like