From fc93bfc34c2c440640ad5c78e0dca91e3861c5ed Mon Sep 17 00:00:00 2001 From: Ankith Date: Mon, 20 Jan 2025 12:01:27 +0530 Subject: [PATCH] Fix/improve _sdl2 stubs --- buildconfig/stubs/pygame/_sdl2/controller.pyi | 8 ++++---- buildconfig/stubs/pygame/_sdl2/touch.pyi | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/buildconfig/stubs/pygame/_sdl2/controller.pyi b/buildconfig/stubs/pygame/_sdl2/controller.pyi index 1ff2ac9188..91de98fd87 100644 --- a/buildconfig/stubs/pygame/_sdl2/controller.pyi +++ b/buildconfig/stubs/pygame/_sdl2/controller.pyi @@ -23,9 +23,9 @@ class Controller: def as_joystick(self) -> JoystickType: ... def get_axis(self, axis: int) -> int: ... def get_button(self, button: int) -> bool: ... - def get_mapping(self) -> dict: ... - def set_mapping(self, mapping: dict) -> int: ... - def rumble(self, ___) -> bool: ... - def stop_rumble( + def get_mapping(self) -> dict[str, str]: ... + def set_mapping(self, mapping: dict[str, str]) -> int: ... + def rumble( self, low_frequency: float, high_frequency: float, duration: int ) -> bool: ... + def stop_rumble(self) -> None: ... diff --git a/buildconfig/stubs/pygame/_sdl2/touch.pyi b/buildconfig/stubs/pygame/_sdl2/touch.pyi index 2febfad900..fe2fdff392 100644 --- a/buildconfig/stubs/pygame/_sdl2/touch.pyi +++ b/buildconfig/stubs/pygame/_sdl2/touch.pyi @@ -1,6 +1,6 @@ from typing import Union def get_num_devices() -> int: ... -def get_device(index: int) -> int: ... -def get_num_fingers(device_id: int) -> int: ... +def get_device(index: int, /) -> int: ... +def get_num_fingers(device_id: int, /) -> int: ... def get_finger(touchid: int, index: int) -> dict[str, Union[int, float]]: ...