diff --git a/pyproject.toml b/pyproject.toml index c12f1cc..63bf29e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,10 @@ doc.shell = "cd docs && mkdocs serve -a localhost:8030" lint.help = "Run linters over all files" lint.cmd = "pre-commit run --all-files" +# PDM hook to automatically sort dependencies when they change. +# "true" is there since GitHub Actions will fail if this returns a non-zero exit code. +post_install.shell = "pre-commit run keep-sorted --files pyproject.toml > /dev/null 2> /dev/null; true" + # # Aeromancy-specific scripts. #