profiles.apply_profile

profiles.apply_profile(config, name)

Return a copy of config with a profile’s check options applied.

A profile’s options win over the same options set in pyproject.toml. Neither config nor the profile is modified. Which checks the profile selects is a separate matter: read get_profile(name).checks for that. The name “default” still works and logs a deprecation warning.

Parameters

config : dict[str, Any]

Full pycmdcheck configuration, as returned by load_config().

name : str

Profile name (minimal, triage, core, pyopensci, strict, or the deprecated default).

Returns

: dict[str, Any]

A new configuration dictionary.

Raises

: ValueError

If no profile has that name.