<s> from __future__ import ( unicode_literals , division , absolute_import , print_function ) <EOL> import json <EOL> from powerline . renderer import Renderer <EOL> class I3barRenderer ( Renderer ) : <EOL> '''<STR_LIT>''' <EOL> @ staticmethod <EOL> def hlstyle ( * args , ** kwargs ) : <EOL> return '<STR_LIT>' <EOL> def hl ( self , contents , fg = None , bg = None , attrs = None ) : <EOL> segment = { <EOL> '<STR_LIT>' : contents , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : <NUM_LIT:0> , <EOL> } <EOL> if fg is not None : <EOL> if fg is not False and fg [ <NUM_LIT:1> ] is not False : <EOL> segment [ '<STR_LIT>' ] = '<STR_LIT>' . format ( fg [ <NUM_LIT:1> ] ) <EOL> if bg is not None : <EOL> if bg is not False and bg [ <NUM_LIT:1> ] is not False : <EOL> segment [ '<STR_LIT>' ] = '<STR_LIT>' . format ( bg [ <NUM_LIT:1> ] ) <EOL> return json . dumps ( segment ) + '<STR_LIT>' <EOL> renderer = I3barRenderer </s>
