Skip to content

Commit

Permalink
Fix some formatting and stub issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zoldalma999 committed Feb 3, 2025
1 parent 8edbcaf commit 6bb80ef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions buildconfig/stubs/pygame/display.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ def flip() -> None:
@overload
def update() -> None: ...
@overload
def update(
rectangle: Optional[Union[RectLike, Iterable[Optional[RectLike]]]], /
) -> None: ...
def update(rectangle: Optional[RectLike], /) -> None: ...
@overload
def update(rectangles: Iterable[Optional[RectLike]], /) -> None: ...
@overload
def update(x: float, y: float, w: float, h: float, /) -> None: ...
@overload
Expand Down Expand Up @@ -333,7 +333,7 @@ def get_driver() -> str:
initialized. This returns the internal name used for the display backend.
This can be used to provide limited information about what display
capabilities might be accelerated. See the ``SDL_VIDEODRIVER`` flags in
``pygame.display.set_mode()`` to see some of the common options.
``pygame.display.init()`` to see some of the common options.
"""

def Info() -> _VidInfo:
Expand Down Expand Up @@ -612,7 +612,7 @@ def toggle_fullscreen() -> int:
"""

@deprecated("since 2.1.4. Removed in SDL3")
def set_gamma(red: float, green: float = ..., blue: float = ..., /) -> int:
def set_gamma(red: float, green: float = ..., blue: float = ..., /) -> bool:
"""Change the hardware gamma ramps.
DEPRECATED: This functionality will go away in SDL3.
Expand All @@ -631,7 +631,7 @@ def set_gamma(red: float, green: float = ..., blue: float = ..., /) -> int:
@deprecated("since 2.1.4. Removed in SDL3")
def set_gamma_ramp(
red: SequenceLike[int], green: SequenceLike[int], blue: SequenceLike[int], /
) -> int:
) -> bool:
"""Change the hardware gamma ramps with a custom lookup.
DEPRECATED: This functionality will go away in SDL3.
Expand Down Expand Up @@ -825,7 +825,7 @@ def message_box(
:param str title: A title string.
:param str message: A message string. If this parameter is set to ``None``, the message will be the title.
:param str message_type: Set the type of message_box, could be ``"info"``, ``"warn"`` or ``"error"``.
:param Window parent_window: The parent window of the message box.
:param pygame.Window parent_window: The parent window of the message box.
:param tuple buttons: An optional sequence of button name strings to show to the user.
:param int return_button: Button index to use if the return key is hit, ``0`` by default.
:param int escape_button: Button index to use if the escape key is hit, ``None`` for no button linked by default.
Expand Down
2 changes: 1 addition & 1 deletion buildconfig/stubs/pygame/window.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class Window:
def position(self) -> tuple[int, int]:
"""Get or set the window position in screen coordinates.
The position may be a tuple of (x, y) coordiantes or ``WINDOWPOS_CENTERED`` or
The position may be a tuple of (x, y) coordinates or ``WINDOWPOS_CENTERED`` or
``WINDOWPOS_UNDEFINED``. The origin is the topleft of the main display.
"""

Expand Down
6 changes: 3 additions & 3 deletions src_c/doc/display_doc.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define DOC_DISPLAY_SETMODE "set_mode(size=(0, 0), flags=0, depth=0, display=0, vsync=0) -> Surface\nInitialize a window or screen for display."
#define DOC_DISPLAY_GETSURFACE "get_surface() -> Optional[Surface]\nGet a reference to the currently set display surface."
#define DOC_DISPLAY_FLIP "flip() -> None\nUpdate the full display Surface to the screen."
#define DOC_DISPLAY_UPDATE "update() -> None\nupdate(rectangle, /) -> None\nupdate(x, y, w, h, /) -> None\nupdate(xy, wh, /) -> None\nUpdate all, or a portion, of the display. For non-OpenGL displays."
#define DOC_DISPLAY_UPDATE "update() -> None\nupdate(rectangle, /) -> None\nupdate(rectangles, /) -> None\nupdate(x, y, w, h, /) -> None\nupdate(xy, wh, /) -> None\nUpdate all, or a portion, of the display. For non-OpenGL displays."
#define DOC_DISPLAY_GETDRIVER "get_driver() -> str\nGet the name of the pygame display backend."
#define DOC_DISPLAY_INFO "Info() -> _VidInfo\nCreate a video display information object."
#define DOC_DISPLAY_GETWMINFO "get_wm_info() -> dict[str, int]\nGet information about the current windowing system."
Expand All @@ -18,8 +18,8 @@
#define DOC_DISPLAY_GETACTIVE "get_active() -> bool\nReturns True when the display is active on the screen."
#define DOC_DISPLAY_ICONIFY "iconify() -> bool\nIconify the display surface."
#define DOC_DISPLAY_TOGGLEFULLSCREEN "toggle_fullscreen() -> int\nSwitch between fullscreen and windowed displays."
#define DOC_DISPLAY_SETGAMMA "set_gamma(red, green=..., blue=..., /) -> int\nChange the hardware gamma ramps."
#define DOC_DISPLAY_SETGAMMARAMP "set_gamma_ramp(red, green, blue, /) -> int\nChange the hardware gamma ramps with a custom lookup."
#define DOC_DISPLAY_SETGAMMA "set_gamma(red, green=..., blue=..., /) -> bool\nChange the hardware gamma ramps."
#define DOC_DISPLAY_SETGAMMARAMP "set_gamma_ramp(red, green, blue, /) -> bool\nChange the hardware gamma ramps with a custom lookup."
#define DOC_DISPLAY_SETICON "set_icon(surface, /) -> None\nChange the system image for the display window."
#define DOC_DISPLAY_SETCAPTION "set_caption(title, icontitle=None, /) -> None\nSet the current window caption."
#define DOC_DISPLAY_GETCAPTION "get_caption() -> tuple[str, str]\nGet the current window caption."
Expand Down

0 comments on commit 6bb80ef

Please sign in to comment.