Lines Matching refs:indent
195 by the indent of the source line.
201 indent, curly, trailing = line.partition('{')
215 if indent.strip():
222 value = textwrap.indent(rstrip_lines(value), indent)
235 (textwrap.indent only adds to non-blank lines.)
531 def normalize_snippet(s, *, indent=0):
536 * dedents so the first nonwhite character on any line is at column "indent"
540 if indent:
541 s = textwrap.indent(s, ' ' * indent)
806 """ % return_error, indent=4)]
858 normalize_snippet(parsearg, indent=4))
895 """ % (nargs, min_pos, max_args), indent=4)]
919 ), indent=4))
926 ), indent=4))
940 """, indent=4) % (nargs, i + 1))
941 parser_code.append(normalize_snippet(parsearg, indent=4))
953 """, indent=4)]
960 """, indent=4)]
996 """ % args_declaration, indent=4)]
1016 """ % args_declaration, indent=4)]
1037 parser_code.append(normalize_snippet(parsearg, indent=4))
1044 """ % (i + 1, add_label), indent=4))
1048 """, indent=4))
1049 parser_code.append(normalize_snippet(parsearg, indent=4))
1065 """ % add_label, indent=4))
1067 parser_code.append(normalize_snippet(parsearg, indent=4))
1072 """ % (argname_fmt % i), indent=4))
1073 parser_code.append(normalize_snippet(parsearg, indent=8))
1079 """ % add_label, indent=4))
1094 """, indent=4)]
1101 """, indent=4)]
1132 """, indent=4))
1138 """, indent=4))
1522 indent is either str or None. It's the leading whitespace
1524 not empty, this is the indent *after* removing the
1532 To illustrate indent and preindent: Assume that '_'
1539 "preindent" would be "____" and "indent" would be "__".
1542 def __init__(self, input, dsl_name=None, signatures=None, output=None, indent='', preindent=''):
1548 self.indent = indent
3983 # so just pretend it's indented like our current indent
3996 indent = self.measure(line)
3997 margin = ' ' * indent
3999 self.indents.append(indent)
4003 if indent == current:
4005 if indent > current:
4006 self.indents.append(indent)
4009 # indent < current
4010 if indent not in self.indents:
4013 while indent != current:
4027 def indent(self, line):
4036 (The inverse of 'indent'.)
4039 indent = self.indents[-1]
4042 return line[indent:]
4072 self.indent = IndentStack()
4282 self.indent.infer(line)
4399 # * This first line establishes the indent for parameters.
4408 # * All lines will have the first D spaces of the indent stripped
4416 # indent as the function declaration.
4418 # with X spaces such that F < X < P. (As before, F is the indent
4468 if not self.indent.infer(line):
4492 assert self.indent.depth == 2
4493 indent = self.indent.infer(line)
4494 if indent == -1:
4498 if indent == 1:
4826 self.parameter_docstring_indent = len(self.indent.margin)
4827 assert self.indent.depth == 3
4838 indent = self.indent.measure(line)
4839 if indent < self.parameter_docstring_indent:
4840 self.indent.infer(line)
4841 assert self.indent.depth < 3
4842 if self.indent.depth == 2:
4845 assert self.indent.depth == 1
4856 new_docstring += self.indent.dedent(line)
4873 line = self.indent.dedent(line).rstrip()
4956 indent = " " * line_length
4967 add(indent)
4968 line_length = len(indent)
5072 add(textwrap.indent(rstrip_lines(p.docstring.rstrip()), " "))