Skip to content

Commit 57f488f

Browse files
[pre-commit.ci] pre-commit autoupdate (#383)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/python-jsonschema/check-jsonschema: 0.29.4 → 0.30.0](python-jsonschema/check-jsonschema@0.29.4...0.30.0) - [github.com/astral-sh/ruff-pre-commit: v0.8.0 → v0.8.1](astral-sh/ruff-pre-commit@v0.8.0...v0.8.1) - [github.com/rbubley/mirrors-prettier: v3.3.3 → v3.4.1](rbubley/mirrors-prettier@v3.3.3...v3.4.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>
1 parent d4feb5a commit 57f488f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repos:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
77
- repo: https://github.com/python-jsonschema/check-jsonschema
8-
rev: 0.29.4
8+
rev: 0.30.0
99
hooks:
1010
- id: check-github-workflows
1111
args: ["--verbose"]
@@ -24,13 +24,13 @@ repos:
2424
hooks:
2525
- id: pyproject-fmt
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: "v0.8.0"
27+
rev: "v0.8.1"
2828
hooks:
2929
- id: ruff-format
3030
- id: ruff
3131
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
3232
- repo: https://github.com/rbubley/mirrors-prettier
33-
rev: "v3.3.3" # Use the sha / tag you want to point at
33+
rev: "v3.4.1" # Use the sha / tag you want to point at
3434
hooks:
3535
- id: prettier
3636
additional_dependencies:

src/filelock/_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def __call__( # noqa: PLR0913
106106
if passed_param != set_param
107107
}
108108
if not non_matching_params:
109-
return cast(BaseFileLock, instance)
109+
return cast("BaseFileLock", instance)
110110

111111
# parameters do not match; raise error
112112
msg = "Singleton lock instances cannot be initialized with differing arguments"
@@ -136,7 +136,7 @@ def __call__( # noqa: PLR0913
136136
if is_singleton:
137137
cls._instances[str(lock_file)] = instance # type: ignore[attr-defined]
138138

139-
return cast(BaseFileLock, instance)
139+
return cast("BaseFileLock", instance)
140140

141141

142142
class BaseFileLock(contextlib.ContextDecorator, metaclass=FileLockMeta):

src/filelock/_unix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def _release(self) -> None:
5656
# Do not remove the lockfile:
5757
# https://github.com/tox-dev/py-filelock/issues/31
5858
# https://stackoverflow.com/questions/17708885/flock-removing-locked-file-without-race-condition
59-
fd = cast(int, self._context.lock_file_fd)
59+
fd = cast("int", self._context.lock_file_fd)
6060
self._context.lock_file_fd = None
6161
fcntl.flock(fd, fcntl.LOCK_UN)
6262
os.close(fd)

src/filelock/_windows.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _acquire(self) -> None:
4040
self._context.lock_file_fd = fd
4141

4242
def _release(self) -> None:
43-
fd = cast(int, self._context.lock_file_fd)
43+
fd = cast("int", self._context.lock_file_fd)
4444
self._context.lock_file_fd = None
4545
msvcrt.locking(fd, msvcrt.LK_UNLCK, 1)
4646
os.close(fd)

src/filelock/asyncio.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __call__( # type: ignore[override] # noqa: PLR0913
9595
run_in_executor=run_in_executor,
9696
executor=executor,
9797
)
98-
return cast(BaseAsyncFileLock, instance)
98+
return cast("BaseAsyncFileLock", instance)
9999

100100

101101
class BaseAsyncFileLock(BaseFileLock, metaclass=AsyncFileLockMeta):

0 commit comments

Comments
 (0)