diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 971c51b3..98ceeb67 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,7 @@ repos: exclude: CHANGELOG.md - repo: https://github.com/JoC0de/pre-commit-prettier - rev: v3.5.3 + rev: b3e25fa39aa676c36bc18eb9eae6f26d9bb63f39 # v3.6.2 using SHA as tags are not persistent hooks: - id: prettier files: \.(json|yml|yaml|toml) @@ -55,7 +55,7 @@ repos: args: ["--print-width=120"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.12 + rev: v0.12.2 hooks: - id: ruff args: ["--fix"] diff --git a/src/lightning_utilities/docs/formatting.py b/src/lightning_utilities/docs/formatting.py index b3cff5f3..a2c4d0ca 100644 --- a/src/lightning_utilities/docs/formatting.py +++ b/src/lightning_utilities/docs/formatting.py @@ -73,7 +73,7 @@ def find_source() -> tuple[str, int, int]: branch = filename.split("/")[0] # do mapping from latest tags to master branch = {"latest": main_branch, "stable": stable_branch}.get(branch, branch) - filename = "/".join([branch] + filename.split("/")[1:]) + filename = "/".join([branch, *filename.split("/")[1:]]) return f"https://github.com/{github_user}/{github_repo}/blob/{filename}"