MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _find_lines

Function _find_lines

tools/python-3.11.9-amd64/Lib/trace.py:338–348  ·  view source on GitHub ↗

Return lineno dict for all code objects reachable from code.

(code, strs)

Source from the content-addressed store, hash-verified

336 return linenos
337
338def _find_lines(code, strs):
339 """Return lineno dict for all code objects reachable from code."""
340 # get all of the lineno information from the code of this scope level
341 linenos = _find_lines_from_code(code, strs)
342
343 # and check the constants for references to other code objects
344 for c in code.co_consts:
345 if inspect.iscode(c):
346 # find another code object, so recurse into it
347 linenos.update(_find_lines(c, strs))
348 return linenos
349
350def _find_strings(filename, encoding=None):
351 """Return a dict of possible docstring positions.

Callers 1

_find_executable_linenosFunction · 0.85

Calls 2

_find_lines_from_codeFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected