mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 03:11:16 +08:00
keyboard : Update stubtest_allowlist and add comments for missing defaults (#9965)
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
# scan_code *should* never be None in real use. This is also according to docs.
|
||||
keyboard.KeyboardEvent.scan_code
|
||||
keyboard._keyboard_event.KeyboardEvent.scan_code
|
||||
# Defaults don't align with possible values
|
||||
keyboard.mouse.wait
|
||||
# TODO: Should this be allowlisted?
|
||||
keyboard.__main__
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# Defaults don't align with possible values
|
||||
keyboard.mouse.on_button
|
||||
keyboard.mouse.wait
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# Defaults don't align with possible values
|
||||
keyboard.mouse.on_button
|
||||
keyboard.mouse.wait
|
||||
|
||||
@@ -47,14 +47,20 @@ def drag(start_x: int, start_y: int, end_x: int, end_y: int, absolute: bool = Tr
|
||||
def on_button(
|
||||
callback: Callable[..., None],
|
||||
args: _Ts = (),
|
||||
# Omitting default: Darwin has no x and x2
|
||||
buttons: list[_MouseButton] | tuple[_MouseButton, ...] | _MouseButton = ...,
|
||||
# Omitting default: Darwin and Linux don't have "double", yet the defaults includes it
|
||||
types: list[_MouseEventType] | tuple[_MouseEventType, ...] | _MouseEventType = ...,
|
||||
) -> _Callback: ...
|
||||
def on_click(callback: Callable[..., None], args: _Ts = ()) -> _Callback: ...
|
||||
def on_double_click(callback: Callable[..., None], args: _Ts = ()) -> _Callback: ...
|
||||
def on_right_click(callback: Callable[..., None], args: _Ts = ()) -> _Callback: ...
|
||||
def on_middle_click(callback: Callable[..., None], args: _Ts = ()) -> _Callback: ...
|
||||
def wait(button: _MouseButton = "left", target_types: tuple[_MouseEventType] = ...) -> None: ...
|
||||
def wait(
|
||||
button: _MouseButton = "left",
|
||||
# Omitting default: Darwin and Linux don't have "double", yet the defaults includes it
|
||||
target_types: tuple[_MouseEventType, ...] = ...,
|
||||
) -> None: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
def get_position() -> tuple[c_long, c_long]: ...
|
||||
|
||||
Reference in New Issue
Block a user