<s> """<STR_LIT>""" <EOL> from traitlets import List , Unicode <EOL> class URLPrefix ( Unicode ) : <EOL> def validate ( self , obj , value ) : <EOL> u = super ( ) . validate ( obj , value ) <EOL> if not u . startswith ( '<STR_LIT:/>' ) : <EOL> u = '<STR_LIT:/>' + u <EOL> if not u . endswith ( '<STR_LIT:/>' ) : <EOL> u = u + '<STR_LIT:/>' <EOL> return u <EOL> class Command ( List ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , default_value = None , ** kwargs ) : <EOL> kwargs . setdefault ( '<STR_LIT>' , <NUM_LIT:1> ) <EOL> if isinstance ( default_value , str ) : <EOL> default_value = [ default_value ] <EOL> super ( ) . __init__ ( Unicode ( ) , default_value , ** kwargs ) <EOL> def validate ( self , obj , value ) : <EOL> if isinstance ( value , str ) : <EOL> value = [ value ] <EOL> return super ( ) . validate ( obj , value ) </s>
