diff --git a/cmdeploy/src/cmdeploy/cmdeploy.py b/cmdeploy/src/cmdeploy/cmdeploy.py index d29b7ea3..6e5f7c7e 100644 --- a/cmdeploy/src/cmdeploy/cmdeploy.py +++ b/cmdeploy/src/cmdeploy/cmdeploy.py @@ -238,7 +238,12 @@ def fmt_cmd_options(parser): def fmt_cmd(args, out): """Run formattting fixes on all chatmail source code.""" - sources = [str(importlib.resources.files(x)) for x in ("chatmaild", "cmdeploy")] + chatmaild_dir = importlib.resources.files("chatmaild").resolve() + cmdeploy_dir = chatmaild_dir.joinpath( + "..", "..", "..", "cmdeploy", "src", "cmdeploy" + ).resolve() + sources = [str(chatmaild_dir), str(cmdeploy_dir)] + format_args = [shutil.which("ruff"), "format"] check_args = [shutil.which("ruff"), "check"]