Fix type of stroke_width parameter in Pillow's ImageDraw.*text* functions (#6008)

This commit is contained in:
Fares Ahmed
2021-09-06 11:13:28 +00:00
committed by GitHub
parent 2620120a90
commit d8ec167681

View File

@@ -66,7 +66,7 @@ class ImageDraw:
direction: Literal["rtl", "ltr", "ttb"] | None = ...,
features: Sequence[str] | None = ...,
language: str | None = ...,
stroke_width: float = ...,
stroke_width: int = ...,
stroke_fill: _Ink | None = ...,
embedded_color: bool = ...,
*args,
@@ -84,7 +84,7 @@ class ImageDraw:
direction: Literal["rtl", "ltr", "ttb"] | None = ...,
features: Any | None = ...,
language: str | None = ...,
stroke_width: float = ...,
stroke_width: int = ...,
stroke_fill: _Ink | None = ...,
embedded_color: bool = ...,
) -> None: ...
@@ -96,7 +96,7 @@ class ImageDraw:
direction: Literal["rtl", "ltr", "ttb"] | None = ...,
features: Sequence[str] | None = ...,
language: str | None = ...,
stroke_width: float = ...,
stroke_width: int = ...,
) -> tuple[int, int]: ...
def multiline_textsize(
self,
@@ -106,7 +106,7 @@ class ImageDraw:
direction: Literal["rtl", "ltr", "ttb"] | None = ...,
features: Sequence[str] | None = ...,
language: str | None = ...,
stroke_width: float = ...,
stroke_width: int = ...,
) -> tuple[int, int]: ...
def textlength(
self,
@@ -128,7 +128,7 @@ class ImageDraw:
direction: Literal["rtl", "ltr", "ttb"] | None = ...,
features: Any | None = ...,
language: str | None = ...,
stroke_width: float = ...,
stroke_width: int = ...,
embedded_color: bool = ...,
) -> tuple[int, int, int, int]: ...
def multiline_textbbox(
@@ -142,7 +142,7 @@ class ImageDraw:
direction: Literal["rtl", "ltr", "ttb"] | None = ...,
features: Any | None = ...,
language: str | None = ...,
stroke_width: float = ...,
stroke_width: int = ...,
embedded_color: bool = ...,
) -> tuple[int, int, int, int]: ...