( # ty: ignore[invalid-method-override] # noqa: PLR0913
cls: type[_AT], # noqa: N805
lock_file: str | os.PathLike[str],
timeout: float = -1,
mode: int = _UNSET_FILE_MODE,
thread_local: bool = False, # noqa: FBT001, FBT002
*,
blocking: bool = True,
is_singleton: bool = False,
poll_interval: float = 0.05,
lifetime: float | None = None,
loop: asyncio.AbstractEventLoop | None = None,
run_in_executor: bool = True,
executor: futures.Executor | None = None,
)
| 74 | |
| 75 | class AsyncFileLockMeta(FileLockMeta): |
| 76 | def __call__( # ty: ignore[invalid-method-override] # noqa: PLR0913 |
| 77 | cls: type[_AT], # noqa: N805 |
| 78 | lock_file: str | os.PathLike[str], |
| 79 | timeout: float = -1, |
| 80 | mode: int = _UNSET_FILE_MODE, |
| 81 | thread_local: bool = False, # noqa: FBT001, FBT002 |
| 82 | *, |
| 83 | blocking: bool = True, |
| 84 | is_singleton: bool = False, |
| 85 | poll_interval: float = 0.05, |
| 86 | lifetime: float | None = None, |
| 87 | loop: asyncio.AbstractEventLoop | None = None, |
| 88 | run_in_executor: bool = True, |
| 89 | executor: futures.Executor | None = None, |
| 90 | ) -> _AT: |
| 91 | if thread_local and run_in_executor: |
| 92 | msg = "run_in_executor is not supported when thread_local is True" |
| 93 | raise ValueError(msg) |
| 94 | return super().__call__( |
| 95 | lock_file=lock_file, |
| 96 | timeout=timeout, |
| 97 | mode=mode, |
| 98 | thread_local=thread_local, |
| 99 | blocking=blocking, |
| 100 | is_singleton=is_singleton, |
| 101 | poll_interval=poll_interval, |
| 102 | lifetime=lifetime, |
| 103 | loop=loop, |
| 104 | run_in_executor=run_in_executor, |
| 105 | executor=executor, |
| 106 | ) |
| 107 | |
| 108 | |
| 109 | class BaseAsyncFileLock(BaseFileLock, metaclass=AsyncFileLockMeta): |
nothing calls this directly
no outgoing calls
no test coverage detected