Skip to content

Commit

Permalink
filelock: fix type annotation
Browse files Browse the repository at this point in the history
Signed-off-by:  Eric Callahan <[email protected]>
  • Loading branch information
Arksine committed Apr 27, 2024
1 parent 379a266 commit 7394a22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moonraker/utils/filelock.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
import contextlib
import asyncio
from . import ServerError
from typing import Optional, Type
from typing import Optional, Type, Union
from types import TracebackType

class LockTimeout(ServerError):
pass

class AsyncExclusiveFileLock(contextlib.AbstractAsyncContextManager):
def __init__(
self, file_path: pathlib.Path, timeout: int = 0
self, file_path: pathlib.Path, timeout: Union[int, float] = 0
) -> None:
self.lock_path = file_path.parent.joinpath(f".{file_path.name}.lock")
self.timeout = timeout
Expand Down

0 comments on commit 7394a22

Please sign in to comment.