Home | History | Annotate | Download | only in python2.7

Lines Matching refs:indent

225 def _indent(s, indent=4):
235 return re.sub('(?m)^(?!$)', indent*' ', s)
426 - indent: The example's indentation in the DocTest string.
436 def __init__(self, source, want, exc_msg=None, lineno=0, indent=0,
449 self.indent = indent
461 self.indent == other.indent and \
469 return hash((self.source, self.want, self.lineno, self.indent,
555 # (including leading indentation and prompts); `indent` is the
561 (?:^(?P<indent> [ ]*) >>> .*) # PS1 line
626 indent=min_indent+len(m.group('indent')),
674 indent = len(m.group('indent'))
679 self._check_prompt_blank(source_lines, indent, name, lineno)
680 self._check_prefix(source_lines[1:], ' '*indent + '.', name, lineno)
681 source = '\n'.join([sl[indent+4:] for sl in source_lines])
690 self._check_prefix(want_lines, ' '*indent, name,
692 want = '\n'.join([wl[indent:] for wl in want_lines])
748 indents = [len(indent) for indent in self._INDENT_RE.findall(s)]
754 def _check_prompt_blank(self, lines, indent, name, lineno):
762 if len(line) >= indent+4 and line[indent+3] != ' ':
766 line[indent:indent+3], line))