MCPcopy Index your code
hub / github.com/github/spec-kit / with_integration_setting

Function with_integration_setting

src/specify_cli/integration_runtime.py:41–68  ·  view source on GitHub ↗

Return integration settings with *key* updated.

(
    state: dict[str, Any],
    key: str,
    integration: Any,
    *,
    script_type: str | None = None,
    raw_options: str | None = None,
    parsed_options: dict[str, Any] | None = None,
)

Source from the content-addressed store, hash-verified

39
40
41def with_integration_setting(
42 state: dict[str, Any],
43 key: str,
44 integration: Any,
45 *,
46 script_type: str | None = None,
47 raw_options: str | None = None,
48 parsed_options: dict[str, Any] | None = None,
49) -> dict[str, dict[str, Any]]:
50 """Return integration settings with *key* updated."""
51 settings = integration_settings(state)
52 current = dict(settings.get(key, {}))
53
54 if script_type:
55 current["script"] = script_type
56 if raw_options is not None:
57 current["raw_options"] = raw_options
58 elif "raw_options" in current and not current.get("raw_options"):
59 current.pop("raw_options", None)
60
61 if parsed_options is not None:
62 current["parsed_options"] = parsed_options
63 elif raw_options is not None:
64 current.pop("parsed_options", None)
65
66 current["invoke_separator"] = integration.effective_invoke_separator(parsed_options)
67 settings[key] = current
68 return settings
69
70
71def invoke_separator_for_integration(

Callers

nothing calls this directly

Calls 3

integration_settingsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected