MCPcopy Index your code
hub / github.com/gitless-vcs/gitless / _padding

Function _padding

gitless/cli/pprint.py:279–285  ·  view source on GitHub ↗
(hunk)

Source from the content-addressed store, hash-verified

277
278
279def _padding(hunk):
280 MIN_LINE_PADDING = 8
281
282 max_line_number = max([
283 hunk.old_start + hunk.old_lines, hunk.new_start + hunk.new_lines])
284 max_line_digits = len(str(max_line_number))
285 return max(MIN_LINE_PADDING, max_line_digits + 1)
286
287
288def _format_line(diff_line, padding, bold_delim=None):

Callers 1

_hunkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected