From 627c0698eecef4b5fa19a86e4b6333e6972ea015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Mon, 10 Jun 2024 03:00:13 +0100 Subject: [PATCH] Revert "Only format correct directories" This reverts commit c3b6f07c4336e6639e4597a800700820155ad294. This commit hardcoded the paths that `isort` and `black` checks. This means that the `check-format` job will act on the entire codebase instead of only changed files. We need to define a `path` argument with a default value in order to achieve the above. Regarding "." vs "beets beetsplug test", the intention behind using "." was to also check python files like `docs/conf.py` and `extra/release.py` which I presume we would also want to format properly. --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a9e646f65..e7f4341d3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -163,11 +163,13 @@ poetry = ">=1.8" # something unwanted locally, we should add these paths to .gitignore. [tool.poe.tasks._black] help = "Run black" -cmd = "black $OPTS beets beetsplug test" +cmd = "black $OPTS $path" +args = { path = { help = "Path to blacken", positional = true, multiple = true, default = "." } } [tool.poe.tasks._isort] help = "Run isort" -cmd = "isort $OPTS beets beetsplug test" +cmd = "isort $OPTS $path" +args = { path = { help = "Path to isort", positional = true, multiple = true, default = "." } } [tool.poe.tasks.bump] help = "Bump project version and update relevant files"