MCPcopy Index your code
hub / github.com/tortoise/tortoise-orm / _emit_heads

Function _emit_heads

tortoise/cli/cli.py:316–329  ·  view source on GitHub ↗
(
    loader: MigrationLoader,
    connection_name: str,
    apps_config: dict[str, dict[str, Any]],
)

Source from the content-addressed store, hash-verified

314
315
316def _emit_heads(
317 loader: MigrationLoader,
318 connection_name: str,
319 apps_config: dict[str, dict[str, Any]],
320) -> None:
321 _echo_connection_header(connection_name)
322 for app_label in sorted(apps_config):
323 _echo_app_header(app_label)
324 keys = list(loader.graph.leaf_nodes(app_label))
325 if not keys:
326 print(f" {_DIM}(no heads){_RESET}")
327 continue
328 for key in keys:
329 print(f" {_CYAN}-{_RESET} {app_label}.{key.name}")
330
331
332def _emit_migration_plan(

Callers 1

headsFunction · 0.85

Calls 3

_echo_connection_headerFunction · 0.85
_echo_app_headerFunction · 0.85
leaf_nodesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…