Skip to content

Any way to automatically sync deps when running pdm run script? #2667

Closed Answered by frostming
Wesztman asked this question in Q&A
Discussion options

You must be logged in to vote

It runs on every invocation of pdm run, actually you don't need to call pdm run in tasks:

[tool.pdm.scripts]
pre_run = "{pdm} sync"
ruff-lint = "ruff check . --fix"
mypycheck = "mypy ."
lint = { composite = ["ruff-lint", "mypycheck"] }

Your solution pre_all only runs when running task all

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@Wesztman
Comment options

@frostming
Comment options

Answer selected by Wesztman
@frostming
Comment options

@Wesztman
Comment options

@Wesztman
Comment options

@Wesztman
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants