Skip to content

Commit b6e892e

Browse files
[pre-commit.ci] pre-commit autoupdate (#300)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 2af9401 commit b6e892e

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: ruff
1111
args: [--fix, --exit-non-zero-on-fix]
1212
- repo: https://github.com/psf/black
13-
rev: 23.12.1
13+
rev: 24.1.1
1414
hooks:
1515
- id: black
1616
- repo: https://github.com/tox-dev/tox-ini-fmt

src/filelock/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
:no-value:
66
77
"""
8+
89
from __future__ import annotations
910

1011
import sys

tests/test_filelock.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,17 @@ def test_ro_file(lock_type: type[BaseFileLock], tmp_file_ro: Path) -> None:
109109
pytest.param(FileNotFoundError, "No such file or directory:", "", id="blank_filename"),
110110
pytest.param(ValueError, "embedded null (byte|character)", "\0", id="null_byte"),
111111
# Should be PermissionError on Windows
112-
pytest.param(PermissionError, "Permission denied:", ".", id="current_directory")
113-
if sys.platform == "win32"
114-
else (
115-
# Should be IsADirectoryError on MacOS and Linux
116-
pytest.param(IsADirectoryError, "Is a directory", ".", id="current_directory")
117-
if sys.platform in ["darwin", "linux"]
118-
else
119-
# Should be some type of OSError at least on other operating systems
120-
pytest.param(OSError, None, ".", id="current_directory")
112+
(
113+
pytest.param(PermissionError, "Permission denied:", ".", id="current_directory")
114+
if sys.platform == "win32"
115+
else (
116+
# Should be IsADirectoryError on MacOS and Linux
117+
pytest.param(IsADirectoryError, "Is a directory", ".", id="current_directory")
118+
if sys.platform in ["darwin", "linux"]
119+
else
120+
# Should be some type of OSError at least on other operating systems
121+
pytest.param(OSError, None, ".", id="current_directory")
122+
)
121123
),
122124
]
123125
+ [pytest.param(OSError, "Invalid argument", i, id=f"invalid_{i}", marks=WindowsOnly) for i in '<>:"|?*\a']

0 commit comments

Comments
 (0)