Lines Matching refs:indent
47 def pprint(object, stream=None, indent=1, width=80, depth=None, *, argument
51 stream=stream, indent=indent, width=width, depth=depth,
55 def pformat(object, indent=1, width=80, depth=None, *, compact=False): argument
57 return PrettyPrinter(indent=indent, width=width, depth=depth,
99 def __init__(self, indent=1, width=80, depth=None, stream=None, *, argument
121 indent = int(indent)
123 if indent < 0:
130 self._indent_per_level = indent
154 def _format(self, object, stream, indent, allowance, context, level): argument
162 max_width = self._width - indent - allowance
167 p(self, object, stream, indent, allowance, context, level + 1)
172 self._pprint_dict(object, stream, indent, allowance,
180 def _pprint_dict(self, object, stream, indent, allowance, context, level): argument
188 self._format_dict_items(items, stream, indent, allowance + 1,
194 def _pprint_ordered_dict(self, object, stream, indent, allowance, context, level): argument
201 indent + len(cls.__name__) + 1, allowance + 1,
207 def _pprint_list(self, object, stream, indent, allowance, context, level): argument
209 self._format_items(object, stream, indent, allowance + 1,
215 def _pprint_tuple(self, object, stream, indent, allowance, context, level): argument
218 self._format_items(object, stream, indent, allowance + len(endchar),
224 def _pprint_set(self, object, stream, indent, allowance, context, level): argument
235 indent += len(typ.__name__) + 1
237 self._format_items(object, stream, indent, allowance + len(endchar),
244 def _pprint_str(self, object, stream, indent, allowance, context, level): argument
252 indent += 1
254 max_width1 = max_width = self._width - indent
288 write('\n' + ' '*indent)
295 def _pprint_bytes(self, object, stream, indent, allowance, context, level): argument
302 indent += 1
306 for rep in _wrap_bytes_repr(object, self._width - indent, allowance):
310 delim = '\n' + ' '*indent
316 def _pprint_bytearray(self, object, stream, indent, allowance, context, level): argument
319 self._pprint_bytes(bytes(object), stream, indent + 10,
325 def _pprint_mappingproxy(self, object, stream, indent, allowance, context, level): argument
327 self._format(object.copy(), stream, indent + 13, allowance + 1,
333 def _format_dict_items(self, items, stream, indent, allowance, context, argument
336 indent += self._indent_per_level
337 delimnl = ',\n' + ' ' * indent
344 self._format(ent, stream, indent + len(rep) + 2,
350 def _format_items(self, items, stream, indent, allowance, context, level): argument
352 indent += self._indent_per_level
355 delimnl = ',\n' + ' ' * indent
357 width = max_width = self._width - indent + 1
387 self._format(ent, stream, indent,
407 def _pprint_default_dict(self, object, stream, indent, allowance, context, level): argument
413 indent += len(cls.__name__) + 1
414 stream.write('%s(%s,\n%s' % (cls.__name__, rdf, ' ' * indent))
415 self._pprint_dict(object, stream, indent, allowance + 1, context, level)
420 def _pprint_counter(self, object, stream, indent, allowance, context, level): argument
430 indent + len(cls.__name__) + 1, allowance + 2,
436 def _pprint_chain_map(self, object, stream, indent, allowance, context, level): argument
442 indent += len(cls.__name__) + 1
445 self._format(m, stream, indent, allowance + 1, context, level)
448 self._format(m, stream, indent, 1, context, level)
449 stream.write(',\n' + ' ' * indent)
453 def _pprint_deque(self, object, stream, indent, allowance, context, level): argument
459 indent += len(cls.__name__) + 1
462 self._format_items(object, stream, indent, allowance + 2,
466 self._format_items(object, stream, indent, 2,
469 stream.write('],\n%smaxlen=%s)' % (' ' * indent, rml))
473 def _pprint_user_dict(self, object, stream, indent, allowance, context, level): argument
474 self._format(object.data, stream, indent, allowance, context, level - 1)
478 def _pprint_user_list(self, object, stream, indent, allowance, context, level): argument
479 self._format(object.data, stream, indent, allowance, context, level - 1)
483 def _pprint_user_string(self, object, stream, indent, allowance, context, level): argument
484 self._format(object.data, stream, indent, allowance, context, level - 1)