Generates a proper description for the given argument.
9825
def _get_description(arg):
    """"""
    desc = []
    otherwise = False
    if arg.can_be_inferred:
        desc.append('If left unspecified, it will be inferred automatically.')
        otherwise = True
    elif arg.is_flag:
        desc.append('This argument defaults to '
                    '<code>None</code> and can be omitted.')
        otherwise = True

    if arg.type in {'InputPeer', 'InputUser', 'InputChannel',
                    'InputNotifyPeer', 'InputDialogPeer'}:
        desc.append(
            'Anything entity-like will work if the library can find its '
            '<code>Input</code> version (e.g., usernames, <code>Peer</code>, '
            '<code>User</code> or <code>Channel</code> objects, etc.).'
        )

    if arg.is_vector:
        if arg.is_generic:
            desc.append('A list of other Requests must be supplied.')
        else:
            desc.append('A list must be supplied.')
    elif arg.is_generic:
        desc.append('A different Request must be supplied for this argument.')
    else:
        otherwise = False  # Always reset to false if no other text is added

    if otherwise:
        desc.insert(1, 'Otherwise,')
        desc[-1] = desc[-1][:1].lower() + desc[-1][1:]

    return ' '.join(desc).replace(
        'list',
        '<span class="tooltip" title="Any iterable that supports len() '
        'will work too">list</span>'
    )
271653
private static final List<Element> buildDescription(String description) {
		
		// Assertions.
		if (description == null) {
			String msg = "Argument 'description' cannot be null.";
			throw new IllegalArgumentException(msg);
		}
		
		List<Element> rslt = new LinkedList<Element>();
		Element e = fac.createElement("p");
		e.setText(description);
		rslt.add(e);
		return rslt;

	}
292464
def description(self):
        """"""
        lines = []
        for line in self.__doc__.split('\n')[2:]:
            line = line.strip()
            if line:
                lines.append(line)
        return ' '.join(lines)
61955
private String getArgumentDescription(
            final Map<String, NamedArgumentDefinition> allActualArguments,
            final Collection<CommandLinePluginDescriptor<?>> pluginDescriptors) {
        final StringBuilder sb = new StringBuilder();
        if (!getDocString().isEmpty()) {
            sb.append(getDocString());
            sb.append("  ");
        }
        if (isCollection()) {
            if (isOptional()) {
                sb.append("This argument may be specified 0 or more times. ");
            } else {
                sb.append("This argument must be specified at least once. ");
            }
        }
        if (isOptional()) {
            sb.append("Default value: ");
            sb.append(getDefaultValueAsString());
            sb.append(". ");
        } else {
            sb.append("Required. ");
        }

        // if this argument definition is a string field claimed by a plugin descriptor (i.e.,
        // it holds the names of plugins specified by the user on the command line, such as read filter names),
        // then we need to delegate to the plugin descriptor to generate the list of allowed values
        if (!usageForPluginDescriptorArgument(sb, pluginDescriptors)) {
            // If the argument wasn't claimed by any descriptor, treat it as a normal argument
            sb.append(getOptionsAsDisplayString());
        }

        if (!getMutexTargetList().isEmpty()) {
            sb.append(" Cannot be used in conjunction with argument(s)");
            for (final String argument : getMutexTargetList()) {
                final NamedArgumentDefinition mutexArgumentDefinition = allActualArguments.get(argument);
                sb.append(" ").append(mutexArgumentDefinition.getUnderlyingField().getName());
                if (!mutexArgumentDefinition.getShortName().isEmpty()) {
                    sb.append(" (").append(mutexArgumentDefinition.getShortName()).append(")");
                }
            }
        }
        return sb.toString();
    }
987473
def formatted_description(self):
        
        desc = self.description

        if desc:
            return desc.replace("%s1", self.formatted_value)
        else:
            return None
516929
def _GetArgsDescription(self, args_type):
    """"""
    args = {}
    if args_type:
      for type_descriptor in args_type.type_infos:
        if not type_descriptor.hidden:
          args[type_descriptor.name] = {
              "description": type_descriptor.description,
              "default": type_descriptor.default,
              "type": "",
          }
          if type_descriptor.type:
            args[type_descriptor.name]["type"] = type_descriptor.type.__name__
    return args
446047
def ids(args):
    
    p = OptionParser(ids.__doc__)
    p.add_option("--until", default=None,
             help="Truncate the name and description at words [default: %default]")
    p.add_option("--description", default=False, action="store_true",
             help="Generate a second column with description [default: %default]")
    p.set_outfile()

    opts, args = p.parse_args(args)

    if len(args) < 1:
        sys.exit(not p.print_help())

    until = opts.until
    fw = must_open(opts.outfile, "w")
    for row in must_open(args):
        if row[0] == ">":
            row = row[1:].rstrip()
            if until:
                row = row.split(until)[0]

            atoms = row.split(None, 1)
            if opts.description:
                outrow = "\t".join(atoms)
            else:
                outrow = atoms[0]
            print(outrow, file=fw)

    fw.close()
763714
def make_describe_attrs(self):
        """"""
        lst = []
        if self.all_groups:
            lst.append((NEWLINE, '\n'))
            lst.append((INDENT, ''))

            for group in self.all_groups:
                if group.name:
                    lst.extend(self.tokens.make_describe_attr(group.kls_name))

        return lst
596932
private String description() {
        return String.format(Locale.ENGLISH, "%s[%s%s%s %s %s]",
            Replicator.class.getSimpleName(),
            isPull(config.getReplicatorType()) ? "<" : "",
            config.isContinuous() ? "*" : "-",
            isPush(config.getReplicatorType()) ? ">" : "",
            config.getDatabase(),
            config.getTarget());
    }
46390
def _get_description(string):
    
    ann = set()
    if not string:
        return "This cluster is inter-genic."
    for item in string:
        for db in item:
            ann = ann.union(set(item[db]))
    return "annotated as: %s ..." % ",".join(list(ann)[:3])
769980
function Description (msg, f, options) {
  this.id = ++id;
  // Static fields:
  this.message = msg;
  this.behavior = f;
  this.verbose = false;
  this.specificationIntended = undefined;
  Object.assign(this, options || {});
  // Internal (dynamic) fields:
  this.specifications = [];
  this.result = undefined;
  this.raisedException = false;
  this.exception = null;
  this.specificationAttempted = 0;
  this.specificationSuccessful = 0;
  this.expectationAttempted = 0;
  this.expectationSuccessful = 0;
  this.pass = false;
  this.log = [];
}
1159385
def description(self, value):
        
        if not isinstance(value, six.string_types) and value is not None:
            raise ValueError("Pass a string, or None")
        self._properties["description"] = value
48622
def describe(cls, full=False):
    """"""
    divider_double = "=" * 80
    divider_single = "-" * 80
    description = cls.__doc__
    message = []
    message.append(divider_double)
    message.append(cls.__name__ + ':')
    message.append(description)
    if full and cls.post_processors(cls):
        message.append(divider_single)
        message.append("Post processors:")
        message.append(divider_single)
        for processor in cls.post_processors(cls):
            message.append(">" + " " * 3 + processor.__name__ + ':')
            message.append(" " * 4 + processor.__doc__)
            message.append('')
    message.append(divider_double)
    message.append('')
    for line in message:
        print(line)
660570
def do_describe(self, line):
        ""
        args = self.getargs(line)

        if '-c' in args:
            create_info = True
            args.remove('-c')
        else:
            create_info = False

        if not args:
            if self.table:
                args = [self.table.name]
            else:
                args = self.tables

        for table in args:
            desc = self.conn.describe_table(table)

            if create_info:
                info = desc['Table']
                schema = info['KeySchema']
                name = info['TableName']

                hkey = schema['HashKeyElement']
                hkey = "%s:%s" % (hkey['AttributeName'], hkey['AttributeType'])

                if 'RangeKeyElement' in schema:
                    rkey = schema['RangeKeyElement']
                    rkey = " %s:%s" % (rkey['AttributeName'], rkey['AttributeType'])
                else:
                    rkey = ''

                prov = info['ProvisionedThroughput']
                prov = "-c %d,%d" % (prov['ReadCapacityUnits'], prov['WriteCapacityUnits'])
                print "create %s %s %s%s" % (name, prov, hkey, rkey)
            else:
                self.pprint(desc, "%s: " % table)
162711
def pretty_describe(object, nestedness=0, indent=2):
    """"""
    if not isinstance(object, dict):
        return str(object)
    sep = f'\n{" " * nestedness * indent}'
    out = sep.join((f'{k}: {pretty_describe(v, nestedness + 1)}' for k, v in object.items()))
    if nestedness > 0 and out:
        return f'{sep}{out}'
    return out
635292
def _build_option_description(k):
    """"""
    o = _get_registered_option(k)
    d = _get_deprecated_option(k)

    buf = ['{} '.format(k)]

    if o.doc:
        doc = '\n'.join(o.doc.strip().splitlines())
    else:
        doc = 'No description available.'

    buf.append(doc)

    if o:
        buf.append(
            '\n    [default: {}] [currently: {}]'.format(
                o.defval, _get_option(k, True)
            )
        )

    if d:
        buf.append(
            '\n    (Deprecated{})'.format(
                ', use `{}` instead.'.format(d.rkey) if d.rkey else ''
            )
        )

    buf.append('\n\n')
    return ''.join(buf)
820702
def analysis_describe(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/describe' % object_id, input_params, always_retry=always_retry, **kwargs)