MCPcopy Create free account
hub / github.com/numpy/numpy / _extendLine

Function _extendLine

numpy/core/arrayprint.py:739–750  ·  view source on GitHub ↗
(s, line, word, line_width, next_line_prefix, legacy)

Source from the content-addressed store, hash-verified

737
738
739def _extendLine(s, line, word, line_width, next_line_prefix, legacy):
740 needs_wrap = len(line) + len(word) > line_width
741 if legacy > 113:
742 # don't wrap lines if it won't help
743 if len(line) <= len(next_line_prefix):
744 needs_wrap = False
745
746 if needs_wrap:
747 s += line.rstrip() + "\n"
748 line = next_line_prefix
749 line += word
750 return s, line
751
752
753def _extendLine_pretty(s, line, word, line_width, next_line_prefix, legacy):

Callers 2

_extendLine_prettyFunction · 0.85
recurserFunction · 0.85

Calls 1

rstripMethod · 0.80

Tested by

no test coverage detected