From 88fb8f80bef954a239492b72d197b32dbe659968 Mon Sep 17 00:00:00 2001 From: Roger Aiudi Date: Wed, 3 Jul 2024 17:31:19 -0400 Subject: [PATCH] Updated typing for the latest MyPy --- aiuti/asyncio.py | 2 +- aiuti/filelock.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aiuti/asyncio.py b/aiuti/asyncio.py index dc5090f..1075b43 100644 --- a/aiuti/asyncio.py +++ b/aiuti/asyncio.py @@ -546,7 +546,7 @@ def buffer_until_timeout( """ if func is None: return partial(buffer_until_timeout, timeout=timeout) # type: ignore - return wraps(func)(BufferAsyncCalls(func, timeout=timeout)) + return wraps(func)(BufferAsyncCalls(func, timeout=timeout)) # type: ignore class BufferAsyncCalls(Generic[T]): diff --git a/aiuti/filelock.py b/aiuti/filelock.py index 610af88..11430cd 100644 --- a/aiuti/filelock.py +++ b/aiuti/filelock.py @@ -57,7 +57,7 @@ def _import_optional(name: str) -> Any: _logger = logging.getLogger(__name__) -PathLike = Union[str, os.PathLike] +PathLike = Union[str, 'os.PathLike[str]'] FileLockT = TypeVar('FileLockT', bound='BaseFileLock')