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

Method leaf_nodes

tortoise/migrations/graph.py:121–127  ·  view source on GitHub ↗
(self, app_label: str | None = None)

Source from the content-addressed store, hash-verified

119 return sorted(nodes)
120
121 def leaf_nodes(self, app_label: str | None = None) -> list[MigrationKey]:
122 nodes = [
123 node.key
124 for node in self.node_map.values()
125 if not node.children and (app_label is None or node.key.app_label == app_label)
126 ]
127 return sorted(nodes)
128
129 def forwards_plan(self, target: MigrationKey) -> list[MigrationKey]:
130 if target not in self.nodes:

Callers 6

_emit_headsFunction · 0.80
_check_keyMethod · 0.80
_full_planMethod · 0.80
_migration_planMethod · 0.80
_full_planMethod · 0.80
_leaf_nodesMethod · 0.80

Calls 1

valuesMethod · 0.45

Tested by

no test coverage detected