Skip to content

Commit 0a8311e

Browse files
committed
Fix LayeredDirty.get_clip() return type annotation
1 parent d1c7a63 commit 0a8311e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

buildconfig/stubs/pygame/sprite.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class LayeredDirty(LayeredUpdates[_DirtySpriteT]):
144144
def clear(self, surface: Surface, bgd: Surface) -> None: ... # type: ignore[override]
145145
def repaint_rect(self, screen_rect: RectLike) -> None: ...
146146
def set_clip(self, screen_rect: Optional[RectLike] = None) -> None: ...
147-
def get_clip(self) -> Union[FRect, Rect]: ...
147+
def get_clip(self) -> Optional[Union[FRect, Rect]]: ...
148148
def set_timing_threshold(self, time_ms: SupportsFloat) -> None: ...
149149
@deprecated(
150150
"since 2.1.1. Use `pygame.sprite.LayeredDirty.set_timing_threshold` instead"

src_py/sprite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ def set_clip(self, screen_rect=None):
13231323
def get_clip(self):
13241324
"""get the area where drawing will occur
13251325
1326-
LayeredDirty.get_clip(): return Rect
1326+
LayeredDirty.get_clip(): return Rect or None
13271327
13281328
"""
13291329
return self._clip

0 commit comments

Comments
 (0)