Skip to content

Docstrings should be indented at more than just the first line #22

@dhermes

Description

@dhermes

See
https://gist.github.com/dhermes/85c3a3a464d2cff312ea
for a (super hacky) way to make this work.

Currently, pep8ify takes

def hello_func(name):
  """Prints hello with the name.

  Args:
    name: String, to print.
  """
  print 'Hello %s, nice to meet you.' % (name,)

and turns it into

def hello_func(name):
    """Prints hello with the name.

  Args:
    name: String, to print.
  """
    print 'Hello %s, nice to meet you.' % (name, )

Running indent_docstrings.py on it gives the desired:

def hello_func(name):
    """Prints hello with the name.

    Args:
      name: String, to print.
    """
    print 'Hello %s, nice to meet you.' % (name, )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions