From 3a30bec9ef7f8521c8f98e77a7091deafb3938a9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 00:34:31 -0400 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#1978) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.7 → v0.6.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.7...v0.6.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * chore: ruff python-version not needed --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 -- test/conftest.py | 4 ++-- unit_test/conftest.py | 2 +- unit_test/main_tests/conftest.py | 4 ++-- unit_test/option_prepare_test.py | 2 +- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aa52034a7..4527564d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.7 + rev: v0.6.1 hooks: - id: ruff args: ["--fix", "--show-fixes"] diff --git a/pyproject.toml b/pyproject.toml index 7f221713a..a52eb2bef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -184,10 +184,8 @@ messages_control.disable = [ ] [tool.ruff] -target-version = "py38" line-length = 100 - [tool.ruff.lint] extend-select = [ "B", # flake8-bugbear diff --git a/test/conftest.py b/test/conftest.py index 72329ec16..e86c199d4 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -37,7 +37,7 @@ def build_frontend_env_nouv(request: pytest.FixtureRequest) -> dict[str, str]: return {"CIBW_BUILD_FRONTEND": frontend} -@pytest.fixture() +@pytest.fixture def build_frontend_env(build_frontend_env_nouv: dict[str, str]) -> dict[str, str]: frontend = build_frontend_env_nouv["CIBW_BUILD_FRONTEND"] if frontend != "build" or platform == "pyodide" or find_uv() is None: @@ -46,7 +46,7 @@ def build_frontend_env(build_frontend_env_nouv: dict[str, str]) -> dict[str, str return {"CIBW_BUILD_FRONTEND": "build[uv]"} -@pytest.fixture() +@pytest.fixture def docker_cleanup() -> Generator[None, None, None]: def get_images() -> set[str]: if detect_ci_provider() is None or platform != "linux": diff --git a/unit_test/conftest.py b/unit_test/conftest.py index 8772dbad5..c67b2408d 100644 --- a/unit_test/conftest.py +++ b/unit_test/conftest.py @@ -19,7 +19,7 @@ def pytest_addoption(parser): ) -@pytest.fixture() +@pytest.fixture def fake_package_dir(tmp_path, monkeypatch): """ Monkey-patch enough for the main() function to run diff --git a/unit_test/main_tests/conftest.py b/unit_test/main_tests/conftest.py index 9ca5fa52a..43c2a0259 100644 --- a/unit_test/main_tests/conftest.py +++ b/unit_test/main_tests/conftest.py @@ -60,7 +60,7 @@ def empty_cm(*args, **kwargs): monkeypatch.setattr(util, "print_new_wheels", empty_cm) -@pytest.fixture() +@pytest.fixture def allow_empty(monkeypatch, fake_package_dir): monkeypatch.setattr(sys, "argv", [*fake_package_dir, "--allow-empty"]) @@ -81,7 +81,7 @@ def platform(request, monkeypatch): return platform_value -@pytest.fixture() +@pytest.fixture def intercepted_build_args(monkeypatch): intercepted = ArgsInterceptor() diff --git a/unit_test/option_prepare_test.py b/unit_test/option_prepare_test.py index 97290eb2a..d8c19d104 100644 --- a/unit_test/option_prepare_test.py +++ b/unit_test/option_prepare_test.py @@ -29,7 +29,7 @@ } -@pytest.fixture() +@pytest.fixture def mock_build_container(monkeypatch): def fail_on_call(*args, **kwargs): msg = "This should never be called"