Format the educate-line description including the default-value(s)
423901
def description_with_default str
			default_s = case default
									when $stdout   then '<stdout>'
									when $stdin    then '<stdin>'
									when $stderr   then '<stderr>'
									when Array
										default.join(', ')
									else
										default.to_s
									end
			defword = str.end_with?('.') ? 'Default' : 'default'
			return "#{str} (#{defword}: #{default_s})"
		end
187707
def normalize_multiline(line):
    
    if line.startswith('def ') and line.rstrip().endswith(':'):
        return line + ' pass'
    elif line.startswith('return '):
        return 'def _(): ' + line
    elif line.startswith('@'):
        return line + 'def _(): pass'
    elif line.startswith('class '):
        return line + ' pass'
    elif line.startswith(('if ', 'elif ', 'for ', 'while ')):
        return line + ' pass'
    else:
        return line
766134
def _format_default(client, value):
    """"""
    if isinstance(value, File):
        return os.path.relpath(
            str((client.workflow_path / value.path).resolve())
        )
    return value
709131
def friendly_format(self):
        """"""
        if self.description is not None:
            msg = self.description
        else:
            msg = 'errorCode: {} / detailCode: {}'.format(
                self.errorCode, self.detailCode
            )
        return self._fmt(self.name, msg)
231013
def describe(self):
        """"""
        result = "No description available"
        if self.description:
            result = "%s" % self.description
        else:
            if self.__doc__:
                s = []
                s += [self.__doc__.strip().replace('\n', '').
                      replace('    ', ' ')]
                result = '\n'.join(s)
        return result
1306988
def markup_description(description):
    
    if apply_markdown:
        description = apply_markdown(description)
    else:
        description = escape(description).replace('\n', '<br />')
        description = '<p>' + description + '</p>'
    return mark_safe(description)
1278687
def to_s(format = :default)
      title_suffix = " (#{title})" if has_title?
      formatted_name = "#{family_name.upcase}, #{given_name}#{title_suffix}"
      formatted_nhs_number = " (#{nhs_number})" if nhs_number.present?
      case format
      when :default then formatted_name
      when :long then "#{formatted_name}#{formatted_nhs_number}"
      else full_name
      end
    end
269392
def format_info_response(value):
    
    info = {}
    for line in value.decode('utf-8').splitlines():
        if not line or line[0] == '#':
            continue
        if ':' in line:
            key, value = line.split(':', 1)
            info[key] = parse_info_value(value)
    return info
559921
def format_value(field_info, value, section):
    """"""
    if section == "FORMAT" and field_info.id == "FT":
        if not value:
            return "."
        elif isinstance(value, list):
            return ";".join(map(format_atomic, value))
    elif field_info.number == 1:
        if value is None:
            return "."
        else:
            return format_atomic(value)
    else:
        if not value:
            return "."
        else:
            return ",".join(map(format_atomic, value))
796225
def pprint_lines(value):
    
    pformatted = pformat(value, width=1, indent=4)
    formatted = "{0}\n {1}\n{2}".format(
        pformatted[0],
        pformatted[1:-1],
        pformatted[-1]
    )
    return Markup(formatted)
79514
def pretty_description(description, wrap_at=None, indent=0):
    
    if wrap_at is None or wrap_at < 0:
        width = console_width(default=79)
        if wrap_at is None:
            wrap_at = width
        else:
            wrap_at += width

    indent = ' ' * indent
    text_wrapper = textwrap.TextWrapper(
        width=wrap_at, replace_whitespace=False,
        initial_indent=indent, subsequent_indent=indent)
    new_desc = []
    for line in description.split('\n'):
        new_desc.append(line.replace('\n', '').strip())
    while not new_desc[0]:
        del new_desc[0]
    while not new_desc[-1]:
        del new_desc[-1]
    separators = [i for i, l in enumerate(new_desc) if not l]
    paragraphs = []
    if separators:
        start, end = 0, separators[0]
        paragraphs.append(new_desc[start:end])
        for i in range(len(separators) - 1):
            start = end + 1
            end = separators[i + 1]
            paragraphs.append(new_desc[start:end])
        paragraphs.append(new_desc[end + 1:])
        return '\n\n'.join(text_wrapper.fill(' '.join(p)) for p in paragraphs)
    return text_wrapper.fill(' '.join(new_desc))
934648
def options_formatting(self):
        
        group = self.parser.add_argument_group("Format")
        group.add_argument(
            "--format", dest="formatting", default=None,
            help="Custom output format using the {} expansion")
        group.add_argument(
            "--value", dest="values", action="append", default=[],
            help="Values for the custom formatting string")
1003011
def _reformat_docstring(doc, format_fn, code_newline=""):
    
    out = []
    status = {"listing": False, "add_line": False, "eat_line": False}
    code = False
    for line in doc:
        if status["add_line"]:
            out.append("\n")
        status["add_line"] = False
        if status["eat_line"]:
            status["eat_line"] = False
            if line.strip() == "":
                continue
        # check for start/end of code block
        if line.strip() == "```":
            code = not code
            out.append(line + code_newline)
            continue
        if not code:
            # if we are in a block listing a blank line ends it
            if line.rstrip() == "":
                status["listing"] = False
            # format the line
            line = format_fn(line, status)
            # see if block start
            if re_listing.match(line):
                status["listing"] = True
        out.append(line.rstrip() + "\n")
    return out
876831
def line(self, value):
        
        if value == self._defaults['line'] and 'line' in self._values:
            del self._values['line']
        else:
            self._values['line'] = value
1152456
def format(self):
        

        values = {}
        title = "Description"
        description = self.command.description + "\n\n" + self.get_ending_note() if not self.is_cog() else inspect.getdoc(self.command)
        sections = []

        if isinstance(self.command, Command):
                description = self.command.short_doc
                sections = [{"name": "Usage", "value": self.get_command_signature()},
                            {"name": "More Info", "value": self.command.help.replace(self.command.short_doc, "").format(prefix=self.clean_prefix),
                             "inline": False}]

        def category(tup):
            cog = tup[1].cog_name
            return cog + ':' if cog is not None else '\u200bNo Category:'

        if self.is_bot():
            title = self.bot.user.display_name + " Help"
            data = sorted(self.filter_command_list(), key=category)
            for category, commands in itertools.groupby(data, key=category):
                section = {}
                commands = list(commands)
                if len(commands) > 0:
                    section['name'] = category
                section['value'] = self.add_commands(commands)
                section['inline'] = False
                sections.append(section)
        elif not sections or self.has_subcommands():
            section = {"name": "Commands:", "inline": False, "value": self.add_commands(self.filter_command_list())}
            sections.append(section)

        values['title'] = title
        values['description'] = description
        values['sections'] = sections
        return values
927361
def _build_option_description(k):
    

    o = _get_registered_option(k)
    d = _get_deprecated_option(k)

    s = '{k} '.format(k=k)

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

    if o:
        s += ('\n    [default: {default}] [currently: {current}]'
              .format(default=o.defval, current=_get_option(k, True)))

    if d:
        s += '\n    (Deprecated'
        s += (', use `{rkey}` instead.'
              .format(rkey=d.rkey if d.rkey else ''))
        s += ')'

    return s
727197
def default_description
      description = 'Run `scss-lint'
      description += " --config #{config}" if config
      description += " #{args}" if args
      description += " #{files.join(' ')}" if files.any?
      description += ' [files...]`'
      description
    end