@@ -821,6 +821,7 @@ async def get_active_window(
821
821
title = 'A' , detect_hidden_windows = False , title_match_mode = (1 , 'Fast' ), blocking = blocking
822
822
)
823
823
824
+ # Ideally, this would be type-hinted for the AHK version. But we cant: https://github.com/python/mypy/issues/9937
824
825
@property
825
826
def active_window (self ) -> AsyncPropertyReturnOptionalAsyncWindow :
826
827
"""
@@ -1441,13 +1442,13 @@ async def show_traytip(self: AsyncAHK[Literal['v2']], title: str, text: str, sec
1441
1442
async def show_traytip (self : AsyncAHK [Literal ['v2' ]], title : str , text : str , second : None = None , type_id : int = 1 , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1442
1443
1443
1444
@overload
1444
- async def show_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , type_id : int = 1 , * , silent : bool = False , large_icon : bool = False ) -> None : ...
1445
+ async def show_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , type_id : int = 1 , * , silent : bool = False , large_icon : bool = False ) -> None : ...
1445
1446
@overload
1446
- async def show_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , type_id : int = 1 , * , silent : bool = False , large_icon : bool = False , blocking : Literal [False ]) -> AsyncFutureResult [None ]: ...
1447
+ async def show_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , type_id : int = 1 , * , silent : bool = False , large_icon : bool = False , blocking : Literal [False ]) -> AsyncFutureResult [None ]: ...
1447
1448
@overload
1448
- async def show_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , type_id : int = 1 , * , silent : bool = False , large_icon : bool = False , blocking : Literal [True ]) -> None : ...
1449
+ async def show_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , type_id : int = 1 , * , silent : bool = False , large_icon : bool = False , blocking : Literal [True ]) -> None : ...
1449
1450
@overload
1450
- async def show_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , type_id : int = 1 , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1451
+ async def show_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , type_id : int = 1 , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1451
1452
# fmt: on
1452
1453
async def show_traytip (
1453
1454
self ,
@@ -1486,13 +1487,13 @@ async def show_error_traytip(self: AsyncAHK[Literal['v2']], title: str, text: st
1486
1487
async def show_error_traytip (self : AsyncAHK [Literal ['v2' ]], title : str , text : str , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1487
1488
1488
1489
@overload
1489
- async def show_error_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False ) -> None : ...
1490
+ async def show_error_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False ) -> None : ...
1490
1491
@overload
1491
- async def show_error_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [False ]) -> AsyncFutureResult [None ]: ...
1492
+ async def show_error_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [False ]) -> AsyncFutureResult [None ]: ...
1492
1493
@overload
1493
- async def show_error_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [True ]) -> None : ...
1494
+ async def show_error_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [True ]) -> None : ...
1494
1495
@overload
1495
- async def show_error_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1496
+ async def show_error_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1496
1497
1497
1498
# fmt: on
1498
1499
async def show_error_traytip (
@@ -1523,13 +1524,13 @@ async def show_info_traytip(self: AsyncAHK[Literal['v2']], title: str, text: str
1523
1524
async def show_info_traytip (self : AsyncAHK [Literal ['v2' ]], title : str , text : str , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1524
1525
1525
1526
@overload
1526
- async def show_info_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False ) -> None : ...
1527
+ async def show_info_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False ) -> None : ...
1527
1528
@overload
1528
- async def show_info_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [False ]) -> AsyncFutureResult [None ]: ...
1529
+ async def show_info_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [False ]) -> AsyncFutureResult [None ]: ...
1529
1530
@overload
1530
- async def show_info_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [True ]) -> None : ...
1531
+ async def show_info_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [True ]) -> None : ...
1531
1532
@overload
1532
- async def show_info_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1533
+ async def show_info_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1533
1534
# fmt: on
1534
1535
async def show_info_traytip (
1535
1536
self : AsyncAHK [Any ],
@@ -1559,13 +1560,13 @@ async def show_warning_traytip(self: AsyncAHK[Literal['v2']], title: str, text:
1559
1560
async def show_warning_traytip (self : AsyncAHK [Literal ['v2' ]], title : str , text : str , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1560
1561
1561
1562
@overload
1562
- async def show_warning_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False ) -> None : ...
1563
+ async def show_warning_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False ) -> None : ...
1563
1564
@overload
1564
- async def show_warning_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [False ]) -> AsyncFutureResult [None ]: ...
1565
+ async def show_warning_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [False ]) -> AsyncFutureResult [None ]: ...
1565
1566
@overload
1566
- async def show_warning_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [True ]) -> None : ...
1567
+ async def show_warning_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : Literal [True ]) -> None : ...
1567
1568
@overload
1568
- async def show_warning_traytip (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1569
+ async def show_warning_traytip (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str , text : str , second : Optional [float ] = None , * , silent : bool = False , large_icon : bool = False , blocking : bool = True ) -> Union [None , AsyncFutureResult [None ]]: ...
1569
1570
# fmt: on
1570
1571
async def show_warning_traytip (
1571
1572
self : AsyncAHK [Any ],
@@ -1742,13 +1743,13 @@ async def win_get(self: AsyncAHK[Literal['v2']], title: str = '', text: str = ''
1742
1743
async def win_get (self : AsyncAHK [Literal ['v2' ]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : bool = True ) -> Union [AsyncWindow , AsyncFutureResult [AsyncWindow ]]: ...
1743
1744
1744
1745
@overload
1745
- async def win_get (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None ) -> Union [AsyncWindow , None ]: ...
1746
+ async def win_get (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None ) -> Union [AsyncWindow , None ]: ...
1746
1747
@overload
1747
- async def win_get (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : Literal [False ]) -> AsyncFutureResult [Union [AsyncWindow , None ]]: ...
1748
+ async def win_get (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : Literal [False ]) -> AsyncFutureResult [Union [AsyncWindow , None ]]: ...
1748
1749
@overload
1749
- async def win_get (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : Literal [True ]) -> Union [AsyncWindow , None ]: ...
1750
+ async def win_get (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : Literal [True ]) -> Union [AsyncWindow , None ]: ...
1750
1751
@overload
1751
- async def win_get (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : bool = True ) -> Union [AsyncWindow , None , AsyncFutureResult [Union [None , AsyncWindow ]], AsyncFutureResult [AsyncWindow ]]: ...
1752
+ async def win_get (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : bool = True ) -> Union [AsyncWindow , None , AsyncFutureResult [Union [None , AsyncWindow ]], AsyncFutureResult [AsyncWindow ]]: ...
1752
1753
# fmt: on
1753
1754
async def win_get (
1754
1755
self ,
@@ -1885,13 +1886,13 @@ async def win_get_position(self: AsyncAHK[Literal['v2']], title: str = '', text:
1885
1886
async def win_get_position (self : AsyncAHK [Literal ['v2' ]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : bool = True ) -> Union [Position , AsyncFutureResult [Position ]]: ...
1886
1887
1887
1888
@overload
1888
- async def win_get_position (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None ) -> Union [Position , None ]: ...
1889
+ async def win_get_position (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None ) -> Union [Position , None ]: ...
1889
1890
@overload
1890
- async def win_get_position (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : Literal [False ]) -> AsyncFutureResult [Union [Position , None ]]: ...
1891
+ async def win_get_position (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : Literal [False ]) -> AsyncFutureResult [Union [Position , None ]]: ...
1891
1892
@overload
1892
- async def win_get_position (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : Literal [True ]) -> Union [Position , None ]: ...
1893
+ async def win_get_position (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : Literal [True ]) -> Union [Position , None ]: ...
1893
1894
@overload
1894
- async def win_get_position (self : AsyncAHK [Optional [ Literal ['v1' ]]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : bool = True ) -> Union [Position , None , AsyncFutureResult [Union [Position , None ]]]: ...
1895
+ async def win_get_position (self : Union [ AsyncAHK [Literal ['v1' ]], AsyncAHK [ None ]], title : str = '' , text : str = '' , exclude_title : str = '' , exclude_text : str = '' , * , title_match_mode : Optional [TitleMatchMode ] = None , detect_hidden_windows : Optional [bool ] = None , blocking : bool = True ) -> Union [Position , None , AsyncFutureResult [Union [Position , None ]]]: ...
1895
1896
# fmt: on
1896
1897
async def win_get_position (
1897
1898
self ,
0 commit comments