From 440dc616be776bb0062843756a50fe0b2c89fb04 Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Wed, 13 Dec 2023 11:29:06 +0100 Subject: [PATCH] FIX: do not sort `Manifest.toml` and `Project.toml` (#255) --- src/repoma/check_dev_files/toml.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/repoma/check_dev_files/toml.py b/src/repoma/check_dev_files/toml.py index 34b1ac0f..ade27983 100644 --- a/src/repoma/check_dev_files/toml.py +++ b/src/repoma/check_dev_files/toml.py @@ -85,6 +85,8 @@ def _update_tomlsort_hook() -> None: excludes.append(r"labels/.*\.toml") if glob("labels*.toml"): excludes.append(r"labels.*\.toml") + if any(glob(f"**/{f}.toml", recursive=True) for f in ("Manifest", "Project")): + excludes.append(r".*(Manifest|Project)\.toml") if excludes: excludes = sorted(excludes, key=str.lower) expected_hook["hooks"][0]["exclude"] = "(?x)^(" + "|".join(excludes) + ")$"