MCPcopy Index your code
hub / github.com/lutzroeder/netron / lineno_for_offset

Method lineno_for_offset

source/python.js:13545–13548  ·  view source on GitHub ↗
(offset)

Source from the content-addressed store, hash-verified

13543 return this._line_starting_offsets[line];
13544 }
13545 lineno_for_offset(offset) {
13546 const iter = this._line_starting_offsets.findIndex((value) => value > offset);
13547 return (iter === -1 ? this._line_starting_offsets.length : iter) - 1;
13548 }
13549 lineno_to_source_lineno(lineno) {
13550 if (this._filename) {
13551 return lineno + this._starting_line_no;

Callers 1

file_line_colMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected