MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _resolve_config_bundle

Function _resolve_config_bundle

cli/main.py:199–209  ·  view source on GitHub ↗
(config_file: str | None)

Source from the content-addressed store, hash-verified

197
198
199def _resolve_config_bundle(config_file: str | None) -> tuple[AppConfig, Path | None, str]:
200 if config_file:
201 path = Path(config_file)
202 return load_app_config(path), path, "explicit"
203 if DEFAULT_MAINLINE_CONFIG.exists():
204 return load_app_config(DEFAULT_MAINLINE_CONFIG), DEFAULT_MAINLINE_CONFIG, "config"
205 if DEFAULT_MAINLINE_CONFIG_EXAMPLE.exists():
206 return load_app_config(DEFAULT_MAINLINE_CONFIG_EXAMPLE), DEFAULT_MAINLINE_CONFIG_EXAMPLE, "example"
207 if DEFAULT_LEGACY_CONFIG.exists():
208 return load_app_config(DEFAULT_LEGACY_CONFIG), DEFAULT_LEGACY_CONFIG, "legacy"
209 return AppConfig(), None, "defaults"
210
211
212def _resolve_config(config_file: str | None) -> AppConfig:

Callers 2

_resolve_configFunction · 0.85
handle_doctorFunction · 0.85

Calls 2

load_app_configFunction · 0.90
AppConfigClass · 0.90

Tested by

no test coverage detected