From 036c0abe9d90972683b9d04f2be29d0c84df49fb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 23:23:14 +0200 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#761) 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/test_benchmark.py | 3 ++- tests/test_main.py | 7 ++++--- tests/test_pybase64.py | 3 ++- tests/utils.py | 5 +++-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f45720a..13c25b5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,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/tests/test_benchmark.py b/tests/test_benchmark.py index 7e29b2e..d27609e 100644 --- a/tests/test_benchmark.py +++ b/tests/test_benchmark.py @@ -1,6 +1,7 @@ -import pybase64 import pytest +import pybase64 + from . import utils pytestmark = pytest.mark.benchmark diff --git a/tests/test_main.py b/tests/test_main.py index 8520418..7d70901 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -5,12 +5,13 @@ from collections.abc import Iterator, Sequence from pathlib import Path -import pybase64 import pytest + +import pybase64 from pybase64.__main__ import main -@pytest.fixture() +@pytest.fixture def emptyfile(tmp_path: Path) -> Iterator[str]: _file = tmp_path / "empty" _file.write_bytes(b"") @@ -18,7 +19,7 @@ def emptyfile(tmp_path: Path) -> Iterator[str]: _file.unlink() -@pytest.fixture() +@pytest.fixture def hellofile(tmp_path: Path) -> Iterator[str]: _file = tmp_path / "helloworld" _file.write_bytes(b"hello world !/?\n") diff --git a/tests/test_pybase64.py b/tests/test_pybase64.py index 9fc5683..1991afe 100644 --- a/tests/test_pybase64.py +++ b/tests/test_pybase64.py @@ -7,8 +7,9 @@ from enum import IntEnum from typing import Any -import pybase64 import pytest + +import pybase64 from pybase64._typing import Buffer, Decode, Encode from . import utils diff --git a/tests/utils.py b/tests/utils.py index c9d636d..d4951de 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -4,9 +4,10 @@ from collections.abc import Iterator from typing import Any -import pybase64 import pytest +import pybase64 + _has_extension = hasattr(pybase64, "_set_simd_path") assert _has_extension or os.environ.get("CIBUILDWHEEL", "0") == "0" @@ -34,7 +35,7 @@ def _get_simd_name(simd_id: int) -> str: ) -@pytest.fixture() +@pytest.fixture def simd(request: pytest.FixtureRequest) -> Iterator[int]: simd_id = request.param if not _has_extension: