Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#761)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.7 → v0.6.1](astral-sh/ruff-pre-commit@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>
  • Loading branch information
pre-commit-ci[bot] authored Aug 19, 2024
1 parent 389f4bf commit 036c0ab
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
3 changes: 2 additions & 1 deletion tests/test_benchmark.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pybase64
import pytest

import pybase64

from . import utils

pytestmark = pytest.mark.benchmark
Expand Down
7 changes: 4 additions & 3 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@
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"")
yield str(_file)
_file.unlink()


@pytest.fixture()
@pytest.fixture
def hellofile(tmp_path: Path) -> Iterator[str]:
_file = tmp_path / "helloworld"
_file.write_bytes(b"hello world !/?\n")
Expand Down
3 changes: 2 additions & 1 deletion tests/test_pybase64.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 036c0ab

Please sign in to comment.