• Home
  • Raw
  • Download

Lines Matching full: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, *, argument
58 return PrettyPrinter(indent=indent, width=width, depth=depth,
104 def __init__(self, indent=1, width=80, depth=None, stream=None, *, argument
109 indent
110 Number of spaces to indent for each level of nesting.
129 indent = int(indent)
131 if indent < 0:
132 raise ValueError('indent must be >= 0')
138 self._indent_per_level = indent
163 def _format(self, object, stream, indent, allowance, context, level): argument
171 max_width = self._width - indent - allowance
176 p(self, object, stream, indent, allowance, context, level + 1)
181 self._pprint_dict(object, stream, indent, allowance,
189 def _pprint_dict(self, object, stream, indent, allowance, context, level): argument
200 self._format_dict_items(items, stream, indent, allowance + 1,
206 def _pprint_ordered_dict(self, object, stream, indent, allowance, context, level): argument
213 indent + len(cls.__name__) + 1, allowance + 1,
219 def _pprint_list(self, object, stream, indent, allowance, context, level): argument
221 self._format_items(object, stream, indent, allowance + 1,
227 def _pprint_tuple(self, object, stream, indent, allowance, context, level): argument
230 self._format_items(object, stream, indent, allowance + len(endchar),
236 def _pprint_set(self, object, stream, indent, allowance, context, level): argument
247 indent += len(typ.__name__) + 1
249 self._format_items(object, stream, indent, allowance + len(endchar),
256 def _pprint_str(self, object, stream, indent, allowance, context, level): argument
264 indent += 1
266 max_width1 = max_width = self._width - indent
300 write('\n' + ' '*indent)
307 def _pprint_bytes(self, object, stream, indent, allowance, context, level): argument
314 indent += 1
318 for rep in _wrap_bytes_repr(object, self._width - indent, allowance):
322 delim = '\n' + ' '*indent
328 def _pprint_bytearray(self, object, stream, indent, allowance, context, level): argument
331 self._pprint_bytes(bytes(object), stream, indent + 10,
337 def _pprint_mappingproxy(self, object, stream, indent, allowance, context, level): argument
339 self._format(object.copy(), stream, indent + 13, allowance + 1,
345 def _pprint_simplenamespace(self, object, stream, indent, allowance, context, level): argument
352 indent += len(cls_name) + 1
353 delimnl = ',\n' + ' ' * indent
363 self._format(ent, stream, indent + len(key) + 1,
372 def _format_dict_items(self, items, stream, indent, allowance, context, argument
375 indent += self._indent_per_level
376 delimnl = ',\n' + ' ' * indent
383 self._format(ent, stream, indent + len(rep) + 2,
389 def _format_items(self, items, stream, indent, allowance, context, level): argument
391 indent += self._indent_per_level
394 delimnl = ',\n' + ' ' * indent
396 width = max_width = self._width - indent + 1
426 self._format(ent, stream, indent,
446 def _pprint_default_dict(self, object, stream, indent, allowance, context, level): argument
452 indent += len(cls.__name__) + 1
453 stream.write('%s(%s,\n%s' % (cls.__name__, rdf, ' ' * indent))
454 self._pprint_dict(object, stream, indent, allowance + 1, context, level)
459 def _pprint_counter(self, object, stream, indent, allowance, context, level): argument
469 indent + len(cls.__name__) + 1, allowance + 2,
475 def _pprint_chain_map(self, object, stream, indent, allowance, context, level): argument
481 indent += len(cls.__name__) + 1
484 self._format(m, stream, indent, allowance + 1, context, level)
487 self._format(m, stream, indent, 1, context, level)
488 stream.write(',\n' + ' ' * indent)
492 def _pprint_deque(self, object, stream, indent, allowance, context, level): argument
498 indent += len(cls.__name__) + 1
501 self._format_items(object, stream, indent, allowance + 2,
505 self._format_items(object, stream, indent, 2,
508 stream.write('],\n%smaxlen=%s)' % (' ' * indent, rml))
512 def _pprint_user_dict(self, object, stream, indent, allowance, context, level): argument
513 self._format(object.data, stream, indent, allowance, context, level - 1)
517 def _pprint_user_list(self, object, stream, indent, allowance, context, level): argument
518 self._format(object.data, stream, indent, allowance, context, level - 1)
522 def _pprint_user_string(self, object, stream, indent, allowance, context, level): argument
523 self._format(object.data, stream, indent, allowance, context, level - 1)