(self)
| 40 | self._context.lock_file_fd = fd |
| 41 | |
| 42 | def _release(self) -> None: |
| 43 | fd = cast(int, self._context.lock_file_fd) |
| 44 | self._context.lock_file_fd = None |
| 45 | msvcrt.locking(fd, msvcrt.LK_UNLCK, 1) |
| 46 | os.close(fd) |
| 47 | |
| 48 | with suppress(OSError): # Probably another instance of the application hat acquired the file lock. |
| 49 | Path(self.lock_file).unlink() |
| 50 | |
| 51 | else: # pragma: win32 no cover |
| 52 |
nothing calls this directly
no outgoing calls
no test coverage detected