Skip to content

Commit

Permalink
add typing for baseproperty
Browse files Browse the repository at this point in the history
  • Loading branch information
kaliiiiiiiiii authored Mar 25, 2024
1 parent 3dc6241 commit 67cdaef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cdp_patches/input/async_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import re
import threading
import time
import typing
from typing import Any, Generator, Literal, Optional, Union

from pywinauto.base_wrapper import ElementNotEnabled, ElementNotVisible
Expand Down Expand Up @@ -48,13 +49,14 @@ async def __ainit__(self) -> None:
if os.name == "nt":
self._base = WindowsBase(self.pid, self.scale_factor)
else:
# mind to change typing of `self.base` property when implementing
raise NotImplementedError(f"pyinput not implemented yet for {os.name}")
await self._wait_for_window()

self._base._offset_toolbar_height()

@property
def base(self):
def base(self) -> WindowsBase:
return self._base

async def _wait_for_window(self) -> None:
Expand Down

0 comments on commit 67cdaef

Please sign in to comment.