Skip to content

Commit 7397dd7

Browse files
[pre-commit.ci] pre-commit autoupdate (#354)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 067b651 commit 7397dd7

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ repos:
1515
- id: tox-ini-fmt
1616
args: ["-p", "fix"]
1717
- repo: https://github.com/tox-dev/pyproject-fmt
18-
rev: "2.1.3"
18+
rev: "2.2.1"
1919
hooks:
2020
- id: pyproject-fmt
2121
additional_dependencies: ["tox>=4.12.1"]
2222
- repo: https://github.com/astral-sh/ruff-pre-commit
23-
rev: "v0.5.0"
23+
rev: "v0.6.3"
2424
hooks:
2525
- id: ruff-format
2626
- id: ruff

tests/test_async_filelock.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
@pytest.mark.parametrize("lock_type", [AsyncFileLock, AsyncSoftFileLock])
1212
@pytest.mark.parametrize("path_type", [str, PurePath, Path])
1313
@pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"])
14-
@pytest.mark.asyncio()
14+
@pytest.mark.asyncio
1515
async def test_simple(
1616
lock_type: type[BaseAsyncFileLock],
1717
path_type: type[str | Path],
@@ -43,7 +43,7 @@ async def test_simple(
4343
@pytest.mark.parametrize("lock_type", [AsyncFileLock, AsyncSoftFileLock])
4444
@pytest.mark.parametrize("path_type", [str, PurePath, Path])
4545
@pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"])
46-
@pytest.mark.asyncio()
46+
@pytest.mark.asyncio
4747
async def test_acquire(
4848
lock_type: type[BaseAsyncFileLock],
4949
path_type: type[str | Path],
@@ -73,7 +73,7 @@ async def test_acquire(
7373

7474

7575
@pytest.mark.parametrize("lock_type", [AsyncFileLock, AsyncSoftFileLock])
76-
@pytest.mark.asyncio()
76+
@pytest.mark.asyncio
7777
async def test_non_blocking(lock_type: type[BaseAsyncFileLock], tmp_path: Path) -> None:
7878
# raises Timeout error when the lock cannot be acquired
7979
lock_path = tmp_path / "a"
@@ -147,7 +147,7 @@ async def test_non_blocking(lock_type: type[BaseAsyncFileLock], tmp_path: Path)
147147

148148
@pytest.mark.parametrize("lock_type", [AsyncFileLock, AsyncSoftFileLock])
149149
@pytest.mark.parametrize("thread_local", [True, False])
150-
@pytest.mark.asyncio()
150+
@pytest.mark.asyncio
151151
async def test_non_executor(lock_type: type[BaseAsyncFileLock], thread_local: bool, tmp_path: Path) -> None:
152152
lock_path = tmp_path / "a"
153153
lock = lock_type(str(lock_path), thread_local=thread_local, run_in_executor=False)
@@ -157,7 +157,7 @@ async def test_non_executor(lock_type: type[BaseAsyncFileLock], thread_local: bo
157157
assert not lock.is_locked
158158

159159

160-
@pytest.mark.asyncio()
160+
@pytest.mark.asyncio
161161
async def test_coroutine_function(tmp_path: Path) -> None:
162162
acquired = released = False
163163

tests/test_filelock.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def make_ro(path: Path) -> Iterator[None]:
6363
path.chmod(path.stat().st_mode | write)
6464

6565

66-
@pytest.fixture()
66+
@pytest.fixture
6767
def tmp_path_ro(tmp_path: Path) -> Iterator[Path]:
6868
with make_ro(tmp_path):
6969
yield tmp_path
@@ -81,7 +81,7 @@ def test_ro_folder(lock_type: type[BaseFileLock], tmp_path_ro: Path) -> None:
8181
lock.acquire()
8282

8383

84-
@pytest.fixture()
84+
@pytest.fixture
8585
def tmp_file_ro(tmp_path: Path) -> Iterator[Path]:
8686
filename = tmp_path / "a"
8787
filename.write_text("")
@@ -680,7 +680,7 @@ def test_lock_can_be_non_thread_local(
680680

681681
def test_subclass_compatibility(tmp_path: Path) -> None:
682682
class MyFileLock(FileLock):
683-
def __init__( # noqa: PLR0913 Too many arguments to function call (6 > 5)
683+
def __init__(
684684
self,
685685
lock_file: str | os.PathLike[str],
686686
timeout: float = -1,
@@ -696,7 +696,7 @@ def __init__( # noqa: PLR0913 Too many arguments to function call (6 > 5)
696696
MyFileLock(str(lock_path), my_param=1)
697697

698698
class MySoftFileLock(SoftFileLock):
699-
def __init__( # noqa: PLR0913 Too many arguments to function call (6 > 5)
699+
def __init__(
700700
self,
701701
lock_file: str | os.PathLike[str],
702702
timeout: float = -1,

0 commit comments

Comments
 (0)