Skip to content

Commit

Permalink
Merge pull request #305 from spyoungtech/fix-keywait-typehint
Browse files Browse the repository at this point in the history
fix typehint for keywait
  • Loading branch information
spyoungtech authored May 10, 2024
2 parents 4007bb8 + 6bbcae5 commit 215c830
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions ahk/_async/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,19 +1083,19 @@ async def key_up(self, key: Union[str, Key], blocking: bool = True) -> Union[Non

# fmt: off
@overload
async def key_wait(self, key_name: str, *, timeout: Optional[int] = None, logical_state: bool = False, released: bool = False) -> bool: ...
async def key_wait(self, key_name: str, *, timeout: Optional[int | float] = None, logical_state: bool = False, released: bool = False) -> bool: ...
@overload
async def key_wait(self, key_name: str, *, blocking: Literal[True], timeout: Optional[int] = None, logical_state: bool = False, released: bool = False) -> bool: ...
async def key_wait(self, key_name: str, *, blocking: Literal[True], timeout: Optional[int | float] = None, logical_state: bool = False, released: bool = False) -> bool: ...
@overload
async def key_wait(self, key_name: str, *, blocking: Literal[False], timeout: Optional[int] = None, logical_state: bool = False, released: bool = False) -> AsyncFutureResult[bool]: ...
async def key_wait(self, key_name: str, *, blocking: Literal[False], timeout: Optional[int | float] = None, logical_state: bool = False, released: bool = False) -> AsyncFutureResult[bool]: ...
@overload
async def key_wait(self, key_name: str, *, timeout: Optional[int] = None, logical_state: bool = False, released: bool = False, blocking: bool = True) -> Union[bool, AsyncFutureResult[bool]]: ...
async def key_wait(self, key_name: str, *, timeout: Optional[int | float] = None, logical_state: bool = False, released: bool = False, blocking: bool = True) -> Union[bool, AsyncFutureResult[bool]]: ...
# fmt: on
async def key_wait(
self,
key_name: str,
*,
timeout: Optional[int] = None,
timeout: Optional[int | float] = None,
logical_state: bool = False,
released: bool = False,
blocking: bool = True,
Expand Down
10 changes: 5 additions & 5 deletions ahk/_sync/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,19 +1071,19 @@ def key_up(self, key: Union[str, Key], blocking: bool = True) -> Union[None, Fut

# fmt: off
@overload
def key_wait(self, key_name: str, *, timeout: Optional[int] = None, logical_state: bool = False, released: bool = False) -> bool: ...
def key_wait(self, key_name: str, *, timeout: Optional[int | float] = None, logical_state: bool = False, released: bool = False) -> bool: ...
@overload
def key_wait(self, key_name: str, *, blocking: Literal[True], timeout: Optional[int] = None, logical_state: bool = False, released: bool = False) -> bool: ...
def key_wait(self, key_name: str, *, blocking: Literal[True], timeout: Optional[int | float] = None, logical_state: bool = False, released: bool = False) -> bool: ...
@overload
def key_wait(self, key_name: str, *, blocking: Literal[False], timeout: Optional[int] = None, logical_state: bool = False, released: bool = False) -> FutureResult[bool]: ...
def key_wait(self, key_name: str, *, blocking: Literal[False], timeout: Optional[int | float] = None, logical_state: bool = False, released: bool = False) -> FutureResult[bool]: ...
@overload
def key_wait(self, key_name: str, *, timeout: Optional[int] = None, logical_state: bool = False, released: bool = False, blocking: bool = True) -> Union[bool, FutureResult[bool]]: ...
def key_wait(self, key_name: str, *, timeout: Optional[int | float] = None, logical_state: bool = False, released: bool = False, blocking: bool = True) -> Union[bool, FutureResult[bool]]: ...
# fmt: on
def key_wait(
self,
key_name: str,
*,
timeout: Optional[int] = None,
timeout: Optional[int | float] = None,
logical_state: bool = False,
released: bool = False,
blocking: bool = True,
Expand Down

0 comments on commit 215c830

Please sign in to comment.