Skip to content

Commit

Permalink
Document overloads of display.update()
Browse files Browse the repository at this point in the history
  • Loading branch information
aatle committed Dec 15, 2024
1 parent 803a9da commit 629cc2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion buildconfig/stubs/pygame/display.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ def set_mode(
def get_surface() -> Optional[Surface]: ...
def flip() -> None: ...
@overload
def update() -> None: ...
@overload
def update(
rectangle: Optional[Union[RectLike, Iterable[Optional[RectLike]]]] = None, /
rectangle: Optional[Union[RectLike, Iterable[Optional[RectLike]]]], /
) -> None: ...
@overload
def update(x: float, y: float, w: float, h: float, /) -> None: ...
Expand Down
5 changes: 4 additions & 1 deletion docs/reST/ref/display.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ required).
.. function:: update

| :sl:`Update all, or a portion, of the display. For non-OpenGL displays.`
| :sg:`update(rectangle=None, /) -> None`
| :sg:`update() -> None`
| :sg:`update(rectangle, /) -> None`
| :sg:`update(x, y, w, h, /) -> None`
| :sg:`update((x, y), (w, h), /) -> None`
| :sg:`update(rectangle_iterable, /) -> None`
For non OpenGL display Surfaces, this function is very similar to
Expand Down

0 comments on commit 629cc2f

Please sign in to comment.