<s> """<STR_LIT>""" <EOL> __version__ = "<STR_LIT>" <EOL> from . . StyleProperty import StyleProperty <EOL> from copy import copy <EOL> from . . import convert as cvt <EOL> __all__ = [ '<STR_LIT>' ] <EOL> class SubStyle ( StyleProperty ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , styleClass , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> validator = cvt . Converter ( cvt . toInstance , styleClass , allowNone = False ) <EOL> doc = kwargs . pop ( '<STR_LIT>' , None ) <EOL> if doc is None : <EOL> doc = "<STR_LIT>" % ( styleClass . __name__ , ) <EOL> self . styleClass = styleClass <EOL> self . kwargs = kwargs <EOL> style = self . styleClass ( ** self . kwargs ) <EOL> StyleProperty . __init__ ( self , style , validator , doc ) <EOL> def validate ( self , value ) : <EOL> """<STR_LIT>""" <EOL> if isinstance ( value , dict ) : <EOL> kw = { } <EOL> kw . update ( self . kwargs ) <EOL> kw . update ( value ) <EOL> value = self . styleClass ( ** kw ) <EOL> return StyleProperty . validate ( self , value ) <EOL> def __str__ ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . owner : <EOL> return "<STR_LIT>" % ( self . styleClass . __name__ , <EOL> self . owner . __name__ , <EOL> self . name ) <EOL> elif self . name : <EOL> return "<STR_LIT>" % ( self . styleClass . __name__ , self . name ) <EOL> else : <EOL> return "<STR_LIT:%s>" % ( self . styleClass . __name__ ) </s>
