MCPcopy Index your code
hub / github.com/numpy/numpy / _extendLine

Function _extendLine

numpy/_core/arrayprint.py:813–824  ·  view source on GitHub ↗
(s, line, word, line_width, next_line_prefix, legacy)

Source from the content-addressed store, hash-verified

811
812
813def _extendLine(s, line, word, line_width, next_line_prefix, legacy):
814 needs_wrap = len(line) + len(word) > line_width
815 if legacy > 113:
816 # don't wrap lines if it won't help
817 if len(line) <= len(next_line_prefix):
818 needs_wrap = False
819
820 if needs_wrap:
821 s += line.rstrip() + "\n"
822 line = next_line_prefix
823 line += word
824 return s, line
825
826
827def _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

Used in the wild real call sites across dependent graphs

searching dependent graphs…