diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2f391b0..ce785ed 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,16 +5,16 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.1.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.15.4 hooks: - id: ruff args: ["--fix"] - repo: https://github.com/rbubley/mirrors-prettier - rev: v3.7.4 + rev: v3.8.1 hooks: - id: prettier args: ["--cache-location=.prettier_cache"] @@ -26,11 +26,11 @@ repos: - id: taplo-lint args: ["--no-schema"] - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.24.1 + rev: v0.25 hooks: - id: validate-pyproject - repo: https://github.com/zizmorcore/zizmor-pre-commit - rev: v1.19.0 + rev: v1.22.0 hooks: - id: zizmor diff --git a/minimum_versions/tests/test_environments.py b/minimum_versions/tests/test_environments.py index 1592d31..d25a083 100644 --- a/minimum_versions/tests/test_environments.py +++ b/minimum_versions/tests/test_environments.py @@ -151,16 +151,14 @@ def test_parse_spec(self, spec_text, expected_spec, expected_warnings): assert actual_warnings == expected_warnings def test_parse_environment(self, monkeypatch): - data = textwrap.dedent( - """\ + data = textwrap.dedent("""\ channels: - conda-forge dependencies: - a=1.1 - b>=3.2 - c=1.6.5 - """.rstrip() - ) + """.rstrip()) monkeypatch.setattr(pathlib.Path, "read_text", lambda _: data) expected_specs = [ @@ -245,8 +243,7 @@ def test_parse_spec_error(self, version_text): ["data", "path", "expected_specs", "expected_warnings"], ( pytest.param( - textwrap.dedent( - """\ + textwrap.dedent("""\ [dependencies] a = "1.0.*" b = "2.2.*" @@ -256,8 +253,7 @@ def test_parse_spec_error(self, version_text): [environments] env1 = { features = ["feature1"] } - """.rstrip() - ), + """.rstrip()), "pixi.toml", [ Spec("a", Version("1.0")), @@ -268,8 +264,7 @@ def test_parse_spec_error(self, version_text): id="default-feature", ), pytest.param( - textwrap.dedent( - """\ + textwrap.dedent("""\ [dependencies] a = "1.0.*" b = "2.2.*" @@ -279,31 +274,27 @@ def test_parse_spec_error(self, version_text): [environments] env1 = { features = ["feature1"], no-default-feature = true } - """.rstrip() - ), + """.rstrip()), "pixi.toml", [Spec("c", Version("3.1"))], [("c", [])], id="no-default-feature", ), pytest.param( - textwrap.dedent( - """\ + textwrap.dedent("""\ [dependencies] a = "1.0.*" [environments] env1 = { features = [] } - """.rstrip() - ), + """.rstrip()), "pixi.toml", [Spec("a", Version("1.0"))], [("a", [])], id="missing-features", ), pytest.param( - textwrap.dedent( - """\ + textwrap.dedent("""\ [dependencies] a = "1.0.*" @@ -312,16 +303,14 @@ def test_parse_spec_error(self, version_text): [environments] env1 = { features = [] } - """.rstrip() - ), + """.rstrip()), "pixi.toml", [Spec("a", Version("1.0"))], [("feature:default", ["Ignored PyPI dependencies."]), ("a", [])], id="pypi_dependencies-default", ), pytest.param( - textwrap.dedent( - """\ + textwrap.dedent("""\ [dependencies] a = "1.0.*" @@ -330,31 +319,27 @@ def test_parse_spec_error(self, version_text): [environments] env1 = { features = ["feat1"] } - """.rstrip() - ), + """.rstrip()), "pixi.toml", [Spec("a", Version("1.0"))], [("feature:feat1", ["Ignored PyPI dependencies."]), ("a", [])], id="pypi_dependencies-feat1", ), pytest.param( - textwrap.dedent( - """\ + textwrap.dedent("""\ [tool.pixi.feature.feature1.dependencies] c = "3.1.*" [tool.pixi.environments] env1 = { features = ["feature1"], no-default-feature = true } - """.rstrip() - ), + """.rstrip()), "pyproject.toml", [Spec("c", Version("3.1"))], [("c", [])], id="pyproject", ), pytest.param( - textwrap.dedent( - """\ + textwrap.dedent("""\ [package] name = "a" @@ -366,8 +351,7 @@ def test_parse_spec_error(self, version_text): [environments] env1 = { features = ["feature1"] } - """.rstrip() - ), + """.rstrip()), "pixi.toml", [Spec("c", Version("3.1"))], [("c", [])],