MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / resolve_entity

Function resolve_entity

tensorflow/python/autograph/pyct/origin_info.py:261–271  ·  view source on GitHub ↗

Like resolve, but extracts the context informartion from an entity.

(node, source, entity)

Source from the content-addressed store, hash-verified

259
260
261def resolve_entity(node, source, entity):
262 """Like resolve, but extracts the context informartion from an entity."""
263 lines, lineno = tf_inspect.getsourcelines(entity)
264 filepath = tf_inspect.getsourcefile(entity)
265
266 # Poor man's attempt at guessing the column offset: count the leading
267 # whitespace. This might not work well with tabs.
268 definition_line = lines[0]
269 col_offset = len(definition_line) - len(definition_line.lstrip())
270
271 resolve(node, source, filepath, lineno, col_offset)

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected