goodconf/__init__.py
def generate_markdown(cls):
        """
        Documents values in markdown
        """
        lines = []
        if cls.__doc__:
            lines.extend(['# {}'.format(cls.__doc__), ''])
        for k, v in cls._values.items():
            lines.append('* **{}**  '.format(k))
            if v.required:
                lines[-1] = lines[-1] + '_REQUIRED_  '
            if v.help:
                lines.append('  {}  '.format(v.help))
            lines.append('  type: `{}`  '.format(v.cast_as.__name__))
            if v.default is not None:
                lines.append('  default: `{}`  '.format(v.default))
        return '\n'.join(lines)
def generate_markdown(cls):
        """
        Documents values in markdown
        """
        lines = []
        if cls.__doc__:
            lines.extend(['# {}'.format(cls.__doc__), ''])
        for k, v in cls._values.items():
            lines.append('* **{}**  '.format(k))
            if v.required:
                lines[-1] = lines[-1] + '_REQUIRED_  '
            if v.help:
                lines.append('  {}  '.format(v.help))
            lines.append('  type: `{}`  '.format(v.cast_as.__name__))
            if v.default is not None:
                lines.append('  default: `{}`  '.format(v.default))
        return '\n'.join(lines)
def generate_markdown ( cls ) : lines = [ ] if cls . __doc__ : lines . extend ( [ '# {}' . format ( cls . __doc__ ) , '' ] ) for k , v in cls . _values . items ( ) : lines . append ( '* **{}**  ' . format ( k ) ) if v . required : lines [ - 1 ] = lines [ - 1 ] + '_REQUIRED_  ' if v . help : lines . append ( '  {}  ' . format ( v . help ) ) lines . append ( '  type: `{}`  ' . format ( v . cast_as . __name__ ) ) if v . default is not None : lines . append ( '  default: `{}`  ' . format ( v . default ) ) return '\n' . join ( lines )
Documents values in markdown
Documents values in markdown