MCPcopy Index your code
hub / github.com/python/cpython / lno_abs2rel

Method lno_abs2rel

Lib/test/test_bdb.py:326–330  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

324 (self.event, self.expect))
325
326 def lno_abs2rel(self):
327 fname = self.canonic(self.frame.f_code.co_filename)
328 lineno = self.frame.f_lineno
329 return ((lineno - self.frame.f_code.co_firstlineno + 1)
330 if fname == self.canonic(__file__) else lineno)
331
332 def lno_rel2abs(self, fname, lineno):
333 return (self.frame.f_code.co_firstlineno + lineno - 1

Callers 2

check_lno_nameMethod · 0.95
get_stateMethod · 0.95

Calls 1

canonicMethod · 0.80

Tested by

no test coverage detected