From 6a71de006d746660cb0ab40a6e6f0b7bb13be9c8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 16:50:50 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/python-jsonschema/check-jsonschema: 0.30.0 → 0.31.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.30.0...0.31.0) - [github.com/astral-sh/ruff-pre-commit: v0.8.3 → v0.9.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.3...v0.9.2) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0bab65a74..5751860a5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.30.0 + rev: 0.31.0 hooks: - id: check-github-workflows args: ["--verbose"] @@ -23,7 +23,7 @@ repos: hooks: - id: validate-pyproject - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.8.3" + rev: "v0.9.2" hooks: - id: ruff-format - id: ruff From 2c8173f7a4d1fd17ef632fa67f7d43946ec24584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Tue, 21 Jan 2025 10:11:00 -0800 Subject: [PATCH 2/2] Fix failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bernát Gábor --- tests/config/loader/ini/replace/test_replace_tox_env.py | 2 +- tests/config/loader/test_toml_loader.py | 4 ++-- tests/tox_env/python/pip/req/test_file.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/config/loader/ini/replace/test_replace_tox_env.py b/tests/config/loader/ini/replace/test_replace_tox_env.py index 8fbfd01ff..663a61251 100644 --- a/tests/config/loader/ini/replace/test_replace_tox_env.py +++ b/tests/config/loader/ini/replace/test_replace_tox_env.py @@ -189,7 +189,7 @@ def test_replace_from_tox_section_missing_value(tox_ini_conf: ToxIniCreator) -> def test_replace_from_section_bad_type(tox_ini_conf: ToxIniCreator) -> None: conf_a = tox_ini_conf("[testenv:e]\nx = {[m]a}\n[m]\na=w\n").get_env("e") conf_a.add_config(keys="x", of_type=int, default=1, desc="d") - with pytest.raises(ValueError, match="invalid literal.*w.*"): + with pytest.raises(ValueError, match=r"invalid literal.*w.*"): assert conf_a["x"] diff --git a/tests/config/loader/test_toml_loader.py b/tests/config/loader/test_toml_loader.py index 670edac3e..3a3b83545 100644 --- a/tests/config/loader/test_toml_loader.py +++ b/tests/config/loader/test_toml_loader.py @@ -63,7 +63,7 @@ def test_toml_loader_list_ok() -> None: def test_toml_loader_list_nok() -> None: - with pytest.raises(TypeError, match="{} is not list"): + with pytest.raises(TypeError, match=r"{} is not list"): perform_load({}, List[str]) @@ -77,7 +77,7 @@ def test_toml_loader_dict_ok() -> None: def test_toml_loader_dict_nok() -> None: - with pytest.raises(TypeError, match="{'a'} is not dictionary"): + with pytest.raises(TypeError, match=r"{'a'} is not dictionary"): perform_load({"a"}, Dict[str, str]) diff --git a/tests/tox_env/python/pip/req/test_file.py b/tests/tox_env/python/pip/req/test_file.py index d9b492446..b88828756 100644 --- a/tests/tox_env/python/pip/req/test_file.py +++ b/tests/tox_env/python/pip/req/test_file.py @@ -401,7 +401,7 @@ def test_requirements_file_missing(tmp_path: Path) -> None: requirements_file = tmp_path / "req.txt" requirements_file.write_text("-r one.txt") req_file = RequirementsFile(requirements_file, constraint=False) - with pytest.raises(ValueError, match="No such file or directory: .*one.txt"): + with pytest.raises(ValueError, match=r"No such file or directory: .*one.txt"): assert req_file.options