(line)
return len(line) - len(stripped)
Returns the indentation of a given line. According to YAML specs, indentation for list item does
    not start at the hyphen
Returns the indentation of a given line. According to YAML specs, indentation for list item does
    not start at the hyphen
Returns the indentation of a given line . According to YAML specs indentation for list item does not start at the hyphen
def get_indent(line):
    """Returns the indentation of a given line. According to YAML specs, indentation for list item does
    not start at the hyphen
    """
    if is_blank(line):
        return 0

    stripped = line.lstrip(' ')
    if stripped.startswith('- '):
        stripped = stripped[2:].lstrip(' ')
        # This is a list item

    return len(line) - len(stripped)
def get_indent ( line ) : if is_blank ( line ) : return 0 stripped = line . lstrip ( ' ' ) if stripped . startswith ( '- ' ) : stripped = stripped [ 2 : ] . lstrip ( ' ' ) # This is a list item return len ( line ) - len ( stripped )