Skip to content

Commit

Permalink
Add PDM post_install hook
Browse files Browse the repository at this point in the history
Ensures that dependencies in pyproject.toml stay sorted.
  • Loading branch information
dmcc committed Jul 26, 2024
1 parent 161fc7c commit ec2fd90
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down

0 comments on commit ec2fd90

Please sign in to comment.