From eae158e7edca2d64d7152b990aa9529e1923b837 Mon Sep 17 00:00:00 2001 From: rethanon <54457966+rethanon@users.noreply.github.com> Date: Sun, 12 Sep 2021 23:30:02 +0100 Subject: [PATCH] Update to type hint (vector2) and docs (draw line) This update: - removes unrequired keyword "width" for pygame.draw.line from docs - corrects type hint for Vector2 (tuple should contain 2 floats not 3) --- buildconfig/pygame-stubs/math.pyi | 2 +- docs/reST/ref/draw.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildconfig/pygame-stubs/math.pyi b/buildconfig/pygame-stubs/math.pyi index 07fc4ee973..8c9d3111b7 100644 --- a/buildconfig/pygame-stubs/math.pyi +++ b/buildconfig/pygame-stubs/math.pyi @@ -102,7 +102,7 @@ class Vector2: @overload def __init__( self, - x: Union[float, Tuple[float, float, float], List[float], Vector2] = 0, + x: Union[float, Tuple[float, float], List[float], Vector2] = 0, ) -> None: ... @overload def __init__( diff --git a/docs/reST/ref/draw.rst b/docs/reST/ref/draw.rst index a42ca5eb7b..2af8f72060 100644 --- a/docs/reST/ref/draw.rst +++ b/docs/reST/ref/draw.rst @@ -302,7 +302,7 @@ object around the draw calls (see :func:`pygame.Surface.lock` and .. function:: line | :sl:`draw a straight line` - | :sg:`line(surface, color, start_pos, end_pos, width) -> Rect` + | :sg:`line(surface, color, start_pos, end_pos) -> Rect` | :sg:`line(surface, color, start_pos, end_pos, width=1) -> Rect` Draws a straight line on the given surface. There are no endcaps. For thick