MCPcopy Create free account
hub / github.com/apache/tvm-ffi / _make_line

Function _make_line

python/tvm_ffi/stub/codegen.py:168–175  ·  view source on GitHub ↗
(mod: str, items: list[ImportItem], indent: int)

Source from the content-addressed store, hash-verified

166 )
167
168 def _make_line(mod: str, items: list[ImportItem], indent: int) -> str:
169 items.sort(key=lambda item: item.name)
170 names = ", ".join(sorted(set(item.name_with_alias for item in items)))
171 indent_str = " " * indent
172 if mod:
173 return f"{indent_str}from {mod} import {names}"
174 else:
175 return f"{indent_str}import {names}"
176
177 results: list[str] = []
178 if imports_concrete:

Callers 1

generate_import_sectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected