upgrade#
import compwa_policy.repo.upgrade
Generate dependency upgrade commands for supported project types.
- migrate_precommit_style_command(cmd: str) str | None[source]#
Migrate a style task command from pre-commit to prek.
>>> migrate_precommit_style_command("pre-commit run --all-files") 'prek run --all-files' >>> migrate_precommit_style_command("pre-commit run -a") 'prek run --all-files' >>> migrate_precommit_style_command("prek run --all-files") is None True