<s> """<STR_LIT>""" <EOL> __all__ = [ "<STR_LIT>" ] <EOL> from openmdao . main . variable import gui_excludes <EOL> from openmdao . main . datatypes . instance import Base <EOL> import warnings <EOL> class Slot ( Base ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , klass = object , allow_none = True , factory = None , <EOL> args = None , kw = None , ** metadata ) : <EOL> if '<STR_LIT>' in metadata : <EOL> warnings . warn ( FutureWarning ( "<STR_LIT>" ) , stacklevel = <NUM_LIT:2> ) <EOL> super ( Slot , self ) . __init__ ( klass , allow_none , factory , args , kw , ** metadata ) <EOL> def get_attribute ( self , name , value , trait , meta ) : <EOL> """<STR_LIT>""" <EOL> io_attr = { } <EOL> io_attr [ '<STR_LIT:name>' ] = name <EOL> io_attr [ '<STR_LIT:type>' ] = trait . trait_type . klass . __name__ <EOL> io_attr [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> slot_attr = { } <EOL> slot_attr [ '<STR_LIT:name>' ] = name <EOL> if value is None : <EOL> slot_attr [ '<STR_LIT>' ] = None <EOL> elif value is [ ] : <EOL> slot_attr [ '<STR_LIT>' ] = [ ] <EOL> else : <EOL> slot_attr [ '<STR_LIT>' ] = type ( value ) . __name__ <EOL> slot_attr [ '<STR_LIT>' ] = io_attr [ '<STR_LIT:type>' ] <EOL> slot_attr [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> for field in meta : <EOL> if field not in gui_excludes : <EOL> slot_attr [ field ] = meta [ field ] <EOL> io_attr [ field ] = meta [ field ] <EOL> return io_attr , slot_attr </s>
