MCPcopy
hub / github.com/tornadoweb/tornado / inner

Function inner

tornado/test/circlerefs_test.py:34–52  ·  view source on GitHub ↗
(level)

Source from the content-addressed store, hash-verified

32 """
33
34 def inner(level):
35 for item in level:
36 item_id = id(item)
37 if item_id not in garbage_ids:
38 continue
39 if item_id in visited_ids:
40 continue
41 if item_id in stack_ids:
42 candidate = stack[stack.index(item) :]
43 candidate.append(item)
44 found.append(candidate)
45 continue
46
47 stack.append(item)
48 stack_ids.add(item_id)
49 inner(gc.get_referents(item))
50 stack.pop()
51 stack_ids.remove(item_id)
52 visited_ids.add(item_id)
53
54 found: typing.List[object] = []
55 stack = []

Callers 3

find_circular_referencesFunction · 0.85
inner2Method · 0.85

Calls 2

appendMethod · 0.80
addMethod · 0.80

Tested by

no test coverage detected