From 11c112be9b88f576bfa86fcd3a91f671906615b4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 10:30:44 +0200 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#675) 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 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- tests/conftest.py | 6 +++--- tests/test_cli.py | 2 +- tests/test_generic.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 546ea404..527ba4cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,7 +52,7 @@ repos: # - poetry.lock: auto-generated file exclude: (ideas/|resources/|tests/|poetry.lock) - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.7 + rev: v0.6.1 hooks: - id: ruff args: [--fix] diff --git a/tests/conftest.py b/tests/conftest.py index 414add80..79491d24 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -19,7 +19,7 @@ from responses import RequestsMock -@pytest.fixture() +@pytest.fixture def project_default(tmp_path): """Project with the default Nitpick style.""" from nitpick.constants import NITPICK_STYLE_TOML @@ -34,7 +34,7 @@ def project_default(tmp_path): ) -@pytest.fixture() +@pytest.fixture def project_remote(request, tmp_path): """Project with a remote style (loaded from a URL).""" from tests.helpers import ProjectMock, tomlstring @@ -65,7 +65,7 @@ def project_remote(request, tmp_path): yield project -@pytest.fixture() +@pytest.fixture def caplog(_caplog): # noqa: F811 """Override the caplog fixture to make pytest work with loguru. diff --git a/tests/test_cli.py b/tests/test_cli.py index 8ce59c75..7cf70af9 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -56,7 +56,7 @@ def test_missing_style_and_suggest_option(tmp_path: Path) -> None: ) -@pytest.fixture() +@pytest.fixture def style_dir_with_types(shared_datadir: Path) -> Generator[Path, None, None]: """A mocked directory with style files organised into "identify" subdirs.""" with mock.patch("nitpick.style.builtin_resources_root") as mock_builtin_resources_root: diff --git a/tests/test_generic.py b/tests/test_generic.py index 597e2fb1..e12b9d2a 100644 --- a/tests/test_generic.py +++ b/tests/test_generic.py @@ -104,7 +104,7 @@ def test_url_to_posix_path(test_path): assert _url_to_posix_path(url) == path -@pytest.fixture() +@pytest.fixture def some_directory(tmp_path: Path, request) -> Generator[Path, None, None]: """Create some directory with some files.""" project_dir = tmp_path / "project"