def add_deprecated_argument(add_argument, argument_name, nargs):
 class ShowWarning(argparse.Action, ):
  'Action to log a warning when an argument is used.'
  def __call__(self, unused1, unused2, unused3, option_string=None):
   sys.stderr.write('Use of {0} is deprecated.\n'.format(option_string))
 configargparse.ACTION_TYPES_THAT_DONT_NEED_A_VALUE.add(ShowWarning)
 add_argument(argument_name, action=ShowWarning, help=argparse.SUPPRESS, nargs=nargs)

def add_deprecated_argument ( add_argument , argument_name , nargs ) : class ShowWarning ( argparse . Action , ) : def __call__ ( self , unused1 , unused2 , unused3 , option_string = None ) : sys . stderr . write ( 'Use of {0} is deprecated.\n' . format ( option_string ) ) configargparse . ACTION_TYPES_THAT_DONT_NEED_A_VALUE . add ( ShowWarning ) add_argument ( argument_name , action = ShowWarning , help = argparse . SUPPRESS , nargs = nargs )
adds a deprecated argument with the name argument_name .