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: