From 5664b97db4a74b753c9d3c2466af8f88d24a0f3e Mon Sep 17 00:00:00 2001 From: holger krekel Date: Thu, 13 Nov 2025 18:11:47 +0100 Subject: [PATCH] fixing path resolution for "fmt" command --- cmdeploy/src/cmdeploy/cmdeploy.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"]