Skip to content

Commit

Permalink
fix overload formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
spyoungtech committed Feb 29, 2024
1 parent 2c67f3e commit baf74ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 102 deletions.
57 changes: 6 additions & 51 deletions ahk/_async/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2923,61 +2923,16 @@ async def image_search(
resp = await self._transport.function_call('AHKImageSearch', args, blocking=blocking)
return resp

# fmt: off
@overload
async def mouse_drag(
self,
x: int,
y: int,
*,
from_position: Optional[Tuple[int, int]] = None,
speed: Optional[int] = None,
button: Optional[Union[MouseButton, str]] = None,
relative: Optional[bool] = None,
coord_mode: Optional[CoordModeRelativeTo] = None,
send_mode: Optional[SendMode] = None,
) -> None: ...
async def mouse_drag(self, x: int, y: int, *, from_position: Optional[Tuple[int, int]] = None, speed: Optional[int] = None, button: Optional[Union[MouseButton, str]] = None, relative: Optional[bool] = None, coord_mode: Optional[CoordModeRelativeTo] = None, send_mode: Optional[SendMode] = None) -> None: ...
@overload
async def mouse_drag(
self,
x: int,
y: int,
*,
from_position: Optional[Tuple[int, int]] = None,
speed: Optional[int] = None,
button: Optional[Union[MouseButton, str]] = None,
relative: Optional[bool] = None,
coord_mode: Optional[CoordModeRelativeTo] = None,
send_mode: Optional[SendMode] = None,
blocking: Literal[False],
) -> AsyncFutureResult[None]: ...
async def mouse_drag(self, x: int, y: int, *, from_position: Optional[Tuple[int, int]] = None, speed: Optional[int] = None, button: Optional[Union[MouseButton, str]] = None, relative: Optional[bool] = None, coord_mode: Optional[CoordModeRelativeTo] = None, send_mode: Optional[SendMode] = None, blocking: Literal[False]) -> AsyncFutureResult[None]: ...
@overload
async def mouse_drag(
self,
x: int,
y: int,
*,
from_position: Optional[Tuple[int, int]] = None,
speed: Optional[int] = None,
button: Optional[Union[MouseButton, str]] = None,
relative: Optional[bool] = None,
coord_mode: Optional[CoordModeRelativeTo] = None,
send_mode: Optional[SendMode] = None,
blocking: Literal[True],
) -> None: ...
async def mouse_drag(self, x: int, y: int, *, from_position: Optional[Tuple[int, int]] = None, speed: Optional[int] = None, button: Optional[Union[MouseButton, str]] = None, relative: Optional[bool] = None, coord_mode: Optional[CoordModeRelativeTo] = None, send_mode: Optional[SendMode] = None, blocking: Literal[True]) -> None: ...
@overload
async def mouse_drag(
self,
x: int,
y: int,
*,
from_position: Optional[Tuple[int, int]] = None,
speed: Optional[int] = None,
button: Optional[Union[MouseButton, str]] = None,
relative: Optional[bool] = None,
blocking: bool = True,
coord_mode: Optional[CoordModeRelativeTo] = None,
send_mode: Optional[SendMode] = None,
) -> Union[None, AsyncFutureResult[None]]: ...
async def mouse_drag(self, x: int, y: int, *, from_position: Optional[Tuple[int, int]] = None, speed: Optional[int] = None, button: Optional[Union[MouseButton, str]] = None, relative: Optional[bool] = None, blocking: bool = True, coord_mode: Optional[CoordModeRelativeTo] = None, send_mode: Optional[SendMode] = None) -> Union[None, AsyncFutureResult[None]]: ...
# fmt: on
async def mouse_drag(
self,
x: int,
Expand Down
57 changes: 6 additions & 51 deletions ahk/_sync/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2911,61 +2911,16 @@ def image_search(
resp = self._transport.function_call('AHKImageSearch', args, blocking=blocking)
return resp

# fmt: off
@overload
def mouse_drag(
self,
x: int,
y: int,
*,
from_position: Optional[Tuple[int, int]] = None,
speed: Optional[int] = None,
button: Optional[Union[MouseButton, str]] = None,
relative: Optional[bool] = None,
coord_mode: Optional[CoordModeRelativeTo] = None,
send_mode: Optional[SendMode] = None,
) -> None: ...
def mouse_drag(self, x: int, y: int, *, from_position: Optional[Tuple[int, int]] = None, speed: Optional[int] = None, button: Optional[Union[MouseButton, str]] = None, relative: Optional[bool] = None, coord_mode: Optional[CoordModeRelativeTo] = None, send_mode: Optional[SendMode] = None) -> None: ...
@overload
def mouse_drag(
self,
x: int,
y: int,
*,
from_position: Optional[Tuple[int, int]] = None,
speed: Optional[int] = None,
button: Optional[Union[MouseButton, str]] = None,
relative: Optional[bool] = None,
coord_mode: Optional[CoordModeRelativeTo] = None,
send_mode: Optional[SendMode] = None,
blocking: Literal[False],
) -> FutureResult[None]: ...
def mouse_drag(self, x: int, y: int, *, from_position: Optional[Tuple[int, int]] = None, speed: Optional[int] = None, button: Optional[Union[MouseButton, str]] = None, relative: Optional[bool] = None, coord_mode: Optional[CoordModeRelativeTo] = None, send_mode: Optional[SendMode] = None, blocking: Literal[False]) -> FutureResult[None]: ...
@overload
def mouse_drag(
self,
x: int,
y: int,
*,
from_position: Optional[Tuple[int, int]] = None,
speed: Optional[int] = None,
button: Optional[Union[MouseButton, str]] = None,
relative: Optional[bool] = None,
coord_mode: Optional[CoordModeRelativeTo] = None,
send_mode: Optional[SendMode] = None,
blocking: Literal[True],
) -> None: ...
def mouse_drag(self, x: int, y: int, *, from_position: Optional[Tuple[int, int]] = None, speed: Optional[int] = None, button: Optional[Union[MouseButton, str]] = None, relative: Optional[bool] = None, coord_mode: Optional[CoordModeRelativeTo] = None, send_mode: Optional[SendMode] = None, blocking: Literal[True]) -> None: ...
@overload
def mouse_drag(
self,
x: int,
y: int,
*,
from_position: Optional[Tuple[int, int]] = None,
speed: Optional[int] = None,
button: Optional[Union[MouseButton, str]] = None,
relative: Optional[bool] = None,
blocking: bool = True,
coord_mode: Optional[CoordModeRelativeTo] = None,
send_mode: Optional[SendMode] = None,
) -> Union[None, FutureResult[None]]: ...
def mouse_drag(self, x: int, y: int, *, from_position: Optional[Tuple[int, int]] = None, speed: Optional[int] = None, button: Optional[Union[MouseButton, str]] = None, relative: Optional[bool] = None, blocking: bool = True, coord_mode: Optional[CoordModeRelativeTo] = None, send_mode: Optional[SendMode] = None) -> Union[None, FutureResult[None]]: ...
# fmt: on
def mouse_drag(
self,
x: int,
Expand Down

0 comments on commit baf74ae

Please sign in to comment.