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

Function _select_apps

tortoise/cli/cli.py:191–202  ·  view source on GitHub ↗

Select specific apps from config, or all if no labels specified.

(config: TortoiseConfig, app_labels: Iterable[str] | None)

Source from the content-addressed store, hash-verified

189
190
191def _select_apps(config: TortoiseConfig, app_labels: Iterable[str] | None) -> dict[str, AppConfig]:
192 """Select specific apps from config, or all if no labels specified."""
193 if not config.apps:
194 raise utils.CLIError("No apps configured in TORTOISE_ORM")
195 if not app_labels:
196 return dict(config.apps)
197 selected: dict[str, AppConfig] = {}
198 for label in app_labels:
199 if label not in config.apps:
200 raise utils.CLIUsageError(f"Unknown app label {label}")
201 selected[label] = config.apps[label]
202 return selected
203
204
205def _group_apps_by_connection(

Callers 4

initFunction · 0.85
makemigrationsFunction · 0.85
historyFunction · 0.85
headsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…