Skip to content

Commit 629cc2f

Browse files
committed
Document overloads of display.update()
1 parent 803a9da commit 629cc2f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

buildconfig/stubs/pygame/display.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ def set_mode(
4747
def get_surface() -> Optional[Surface]: ...
4848
def flip() -> None: ...
4949
@overload
50+
def update() -> None: ...
51+
@overload
5052
def update(
51-
rectangle: Optional[Union[RectLike, Iterable[Optional[RectLike]]]] = None, /
53+
rectangle: Optional[Union[RectLike, Iterable[Optional[RectLike]]]], /
5254
) -> None: ...
5355
@overload
5456
def update(x: float, y: float, w: float, h: float, /) -> None: ...

docs/reST/ref/display.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,10 @@ required).
273273
.. function:: update
274274

275275
| :sl:`Update all, or a portion, of the display. For non-OpenGL displays.`
276-
| :sg:`update(rectangle=None, /) -> None`
276+
| :sg:`update() -> None`
277+
| :sg:`update(rectangle, /) -> None`
278+
| :sg:`update(x, y, w, h, /) -> None`
279+
| :sg:`update((x, y), (w, h), /) -> None`
277280
| :sg:`update(rectangle_iterable, /) -> None`
278281
279282
For non OpenGL display Surfaces, this function is very similar to

0 commit comments

Comments
 (0)