diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b9beadea..b496bee5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ exclude: | )$ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.13.2 + rev: v0.15.20 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -21,7 +21,7 @@ repos: - id: check-added-large-files - id: check-yaml - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 + rev: v2.4.2 hooks: - id: codespell args: ["--ignore-words-list", "crate,releas", "--skip", "*.svg"] diff --git a/src/pharaoh/templating/second_level/template_env.py b/src/pharaoh/templating/second_level/template_env.py index 3ceb7090..f9423741 100644 --- a/src/pharaoh/templating/second_level/template_env.py +++ b/src/pharaoh/templating/second_level/template_env.py @@ -282,7 +282,7 @@ def join_path(self, template: str, parent: str) -> str: # In this case under Python 3.7, the following parent.is_dir() is failing because os.stat # does not allow <> in the file path, Python 3.9 does, apparently. # So we split off the suffix after <> (which would be done anyway using the "parent.parent" statement). - parent = parent.split("<>")[0] + parent = parent.split("<>", maxsplit=1)[0] parent_path = Path(parent) if not parent_path.is_dir(): parent_path = parent_path.parent