mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Correct Turtle.dot() parameters (#14694)
This commit is contained in:
committed by
GitHub
parent
d9c76e1d9f
commit
6937a9b193
@@ -0,0 +1,35 @@
|
||||
from turtle import Turtle, dot
|
||||
|
||||
Turtle().dot()
|
||||
Turtle().dot(10)
|
||||
Turtle().dot(size=10)
|
||||
Turtle().dot((0, 0, 0))
|
||||
Turtle().dot(size=(0, 0, 0))
|
||||
Turtle().dot("blue")
|
||||
Turtle().dot("")
|
||||
Turtle().dot(size="blue")
|
||||
Turtle().dot(20, "blue")
|
||||
Turtle().dot(20, "blue")
|
||||
Turtle().dot(20, (0, 0, 0))
|
||||
Turtle().dot(20, 0, 0, 0)
|
||||
|
||||
Turtle().dot(size=10, color="blue") # type: ignore
|
||||
Turtle().dot(10, color="blue") # type: ignore
|
||||
Turtle().dot(color="blue") # type: ignore
|
||||
|
||||
dot()
|
||||
dot(10)
|
||||
dot(size=10)
|
||||
dot((0, 0, 0))
|
||||
dot(size=(0, 0, 0))
|
||||
dot("blue")
|
||||
dot("")
|
||||
dot(size="blue")
|
||||
dot(20, "blue")
|
||||
dot(20, "blue")
|
||||
dot(20, (0, 0, 0))
|
||||
dot(20, 0, 0, 0)
|
||||
|
||||
dot(size=10, color="blue") # type: ignore
|
||||
dot(10, color="blue") # type: ignore
|
||||
dot(color="blue") # type: ignore
|
||||
+12
-2
@@ -463,7 +463,12 @@ class RawTurtle(TPen, TNavigator): # type: ignore[misc] # Conflicting methods
|
||||
|
||||
def begin_fill(self) -> None: ...
|
||||
def end_fill(self) -> None: ...
|
||||
def dot(self, size: int | None = None, *color: _Color) -> None: ...
|
||||
@overload
|
||||
def dot(self, size: int | _Color | None = None) -> None: ...
|
||||
@overload
|
||||
def dot(self, size: int | None, color: _Color, /) -> None: ...
|
||||
@overload
|
||||
def dot(self, size: int | None, r: float, g: float, b: float, /) -> None: ...
|
||||
def write(
|
||||
self, arg: object, move: bool = False, align: str = "left", font: tuple[str, int, str] = ("Arial", 8, "normal")
|
||||
) -> None: ...
|
||||
@@ -747,7 +752,12 @@ if sys.version_info >= (3, 14):
|
||||
|
||||
def begin_fill() -> None: ...
|
||||
def end_fill() -> None: ...
|
||||
def dot(size: int | None = None, *color: _Color) -> None: ...
|
||||
@overload
|
||||
def dot(size: int | _Color | None = None) -> None: ...
|
||||
@overload
|
||||
def dot(size: int | None, color: _Color, /) -> None: ...
|
||||
@overload
|
||||
def dot(size: int | None, r: float, g: float, b: float, /) -> None: ...
|
||||
def write(arg: object, move: bool = False, align: str = "left", font: tuple[str, int, str] = ("Arial", 8, "normal")) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
|
||||
Reference in New Issue
Block a user