config.get_check_config
config.get_check_config(config, check_name)Get configuration for a specific check.
Extracts the configuration for a named check from the full configuration. Handles both boolean shorthand (e.g., metadata = true) and dictionary configuration (e.g., tests = { enabled = true, runner = "pytest" }).
Parameters
Returns
Examples
Boolean config is converted to dict:
>>> config = {"checks": {"metadata": True}}
>>> get_check_config(config, "metadata")
{'enabled': True}Dict config is passed through with enabled defaulting to True:
>>> config = {"checks": {"tests": {"runner": "pytest"}}}
>>> get_check_config(config, "tests")
{'runner': 'pytest', 'enabled': True}Unknown checks default to enabled:
>>> config = {"checks": {}}
>>> get_check_config(config, "unknown")
{'enabled': True}