#NEWLINE# def set_config( self , **config ) : #NEWLINE# #INDENT# 'Shadow all the current config.' #NEWLINE# reinit = False #NEWLINE# if ( 'stdopt' in config ) : #NEWLINE# #INDENT# stdopt = config . pop ( 'stdopt' ) #NEWLINE# reinit = ( stdopt != self . stdopt ) #NEWLINE# self . stdopt = stdopt #NEWLINE# #UNINDENT# if ( 'attachopt' in config ) : #NEWLINE# #INDENT# attachopt = config . pop ( 'attachopt' ) #NEWLINE# reinit = ( reinit or ( attachopt != self . attachopt ) ) #NEWLINE# self . attachopt = attachopt #NEWLINE# #UNINDENT# if ( 'attachvalue' in config ) : #NEWLINE# #INDENT# attachvalue = config . pop ( 'attachvalue' ) #NEWLINE# reinit = ( reinit or ( attachvalue != self . attachvalue ) ) #NEWLINE# self . attachvalue = attachvalue #NEWLINE# #UNINDENT# if ( 'auto2dashes' in config ) : #NEWLINE# #INDENT# self . auto2dashes = config . pop ( 'auto2dashes' ) #NEWLINE# #UNINDENT# if ( 'name' in config ) : #NEWLINE# #INDENT# name = config . pop ( 'name' ) #NEWLINE# reinit = ( reinit or ( name != self . name ) ) #NEWLINE# self . name = name #NEWLINE# #UNINDENT# if ( 'help' in config ) : #NEWLINE# #INDENT# self . help = config . pop ( 'help' ) #NEWLINE# self . _set_or_remove_extra_handler ( self . help , ( '--help' , '-h' ) , self . help_handler ) #NEWLINE# #UNINDENT# if ( 'version' in config ) : #NEWLINE# #INDENT# self . version = config . pop ( 'version' ) #NEWLINE# self . _set_or_remove_extra_handler ( ( self . version is not None ) , ( '--version' , '-v' ) , self . version_handler ) #NEWLINE# #UNINDENT# if ( 'case_sensitive' in config ) : #NEWLINE# #INDENT# case_sensitive = config . pop ( 'case_sensitive' ) #NEWLINE# reinit = ( reinit or ( case_sensitive != self . case_sensitive ) ) #NEWLINE# self . case_sensitive = case_sensitive #NEWLINE# #UNINDENT# if ( 'optionsfirst' in config ) : #NEWLINE# #INDENT# self . options_first = config . pop ( 'optionsfirst' ) #NEWLINE# #UNINDENT# if ( 'appearedonly' in config ) : #NEWLINE# #INDENT# self . appeared_only = config . pop ( 'appearedonly' ) #NEWLINE# #UNINDENT# if ( 'namedoptions' in config ) : #NEWLINE# #INDENT# namedoptions = config . pop ( 'namedoptions' ) #NEWLINE# reinit = ( reinit or ( namedoptions != self . namedoptions ) ) #NEWLINE# self . namedoptions = namedoptions #NEWLINE# #UNINDENT# if ( 'extra' in config ) : #NEWLINE# #INDENT# self . extra . update ( self . _formal_extra ( config . pop ( 'extra' ) ) ) #NEWLINE# #UNINDENT# if config : #NEWLINE# #INDENT# raise ValueError ( ( '`%s` %s not accepted key argument%s' % ( '`, `' . join ( config ) , ( 'is' if ( len ( config ) == 1 ) else 'are' ) , ( '' if ( len ( config ) == 1 ) else 's' ) ) ) ) #NEWLINE# #UNINDENT# if ( ( self . doc is not None ) and reinit ) : #NEWLINE# #INDENT# logger . warning ( 'You changed the config that requires re-initialized `Docpie` object. Create a new one instead' ) #NEWLINE# self . _init ( )