MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / set_lines

Method set_lines

src/licensedcode/match.py:399–408  ·  view source on GitHub ↗

Set this match start and end lines using a mapping of ``line_by_pos`` {pos: line}.

(self, line_by_pos)

Source from the content-addressed store, hash-verified

397 return self.start_line, self.end_line
398
399 def set_lines(self, line_by_pos):
400 """
401 Set this match start and end lines using a mapping of ``line_by_pos``
402 {pos: line}.
403 """
404 self.start_line = line_by_pos[self.qstart]
405 self.end_line = line_by_pos[self.qend]
406 if TRACE_SET_LINES:
407 logger_debug('LicenseMatch.set_lines: match.start_line :', self.start_line)
408 logger_debug('LicenseMatch.set_lines: match.end_line :', self.end_line)
409
410 @property
411 def qstart(self):

Callers 3

linesMethod · 0.95
set_matched_linesFunction · 0.80

Calls 1

logger_debugFunction · 0.70

Tested by 1