Skip to content

Commit

Permalink
Replace raise error with empty body in _HasRectAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
aatle committed Aug 27, 2024
1 parent 64267dd commit d2c254f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions buildconfig/stubs/pygame/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ class _HasRectAttribute(Protocol):
# An object that has a rect attribute that is either a rect, or a function
# that returns a rect conforms to the rect protocol
@property
def rect(self) -> Union["RectLike", Callable[[], "RectLike"]]:
raise NotImplementedError
def rect(self) -> Union["RectLike", Callable[[], "RectLike"]]: ...


RectLike = Union[SequenceLike[float], SequenceLike[Coordinate], _HasRectAttribute]
Expand Down
3 changes: 1 addition & 2 deletions src_py/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ class _HasRectAttribute(Protocol):
# An object that has a rect attribute that is either a rect, or a function
# that returns a rect conforms to the rect protocol
@property
def rect(self) -> Union["RectLike", Callable[[], "RectLike"]]:
raise NotImplementedError
def rect(self) -> Union["RectLike", Callable[[], "RectLike"]]: ...


RectLike = Union[SequenceLike[float], SequenceLike[Coordinate], _HasRectAttribute]
Expand Down

0 comments on commit d2c254f

Please sign in to comment.