MCPcopy Index your code
hub / github.com/SourceCode-AI/aura / imports_to_tree

Method imports_to_tree

aura/output/text.py:258–271  ·  view source on GitHub ↗

Transform a list of imported modules into a module tree

(self, items: list)

Source from the content-addressed store, hash-verified

256 yield from self.pprint_imports(subitems, indent + new_indent)
257
258 def imports_to_tree(self, items: list) -> dict:
259 """
260 Transform a list of imported modules into a module tree
261 """
262 root = {}
263 for x in items:
264 parts = x.split(".")
265 current = root
266 for x in parts:
267 if x not in current:
268 current[x] = {}
269 current = current[x]
270
271 return root
272
273 def output_table(self, table: Table):
274 out = PrettyReport(fd=self._fd)

Callers 1

outputMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected