Skip to content

Commit

Permalink
FIX: do not sort Manifest.toml and Project.toml (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer authored Dec 13, 2023
1 parent 77335b6 commit 440dc61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/repoma/check_dev_files/toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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) + ")$"
Expand Down

0 comments on commit 440dc61

Please sign in to comment.