mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Bump turtle to 3.14 (#14167)
This commit is contained in:
@@ -28,15 +28,6 @@ multiprocessing.process.BaseProcess.interrupt
|
||||
multiprocessing.synchronize.SemLock.locked
|
||||
tarfile.TarFile.zstopen
|
||||
tkinter.Event.__class_getitem__
|
||||
turtle.__all__
|
||||
turtle.RawTurtle.fill
|
||||
turtle.RawTurtle.poly
|
||||
turtle.TurtleScreen.no_animation
|
||||
turtle.TurtleScreen.save
|
||||
turtle.fill
|
||||
turtle.no_animation
|
||||
turtle.poly
|
||||
turtle.save
|
||||
|
||||
# =========================
|
||||
# New errors in Python 3.14
|
||||
|
||||
+38
-1
@@ -1,5 +1,7 @@
|
||||
import sys
|
||||
from collections.abc import Callable, Sequence
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import Callable, Generator, Sequence
|
||||
from contextlib import contextmanager
|
||||
from tkinter import Canvas, Frame, Misc, PhotoImage, Scrollbar
|
||||
from typing import Any, ClassVar, Literal, TypedDict, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
@@ -128,6 +130,9 @@ __all__ = [
|
||||
"Terminator",
|
||||
]
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
__all__ += ["fill", "no_animation", "poly", "save"]
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
__all__ += ["teleport"]
|
||||
|
||||
@@ -231,6 +236,10 @@ class TurtleScreen(TurtleScreenBase):
|
||||
def delay(self, delay: None = None) -> int: ...
|
||||
@overload
|
||||
def delay(self, delay: int) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
@contextmanager
|
||||
def no_animation(self) -> Generator[None]: ...
|
||||
|
||||
def update(self) -> None: ...
|
||||
def window_width(self) -> int: ...
|
||||
def window_height(self) -> int: ...
|
||||
@@ -249,6 +258,8 @@ class TurtleScreen(TurtleScreenBase):
|
||||
# Looks like if self.cv is not a ScrolledCanvas, this could return a tuple as well
|
||||
@overload
|
||||
def screensize(self, canvwidth: int, canvheight: int, bg: _Color | None = None) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def save(self, filename: StrPath, *, overwrite: bool = False) -> None: ...
|
||||
onscreenclick = onclick
|
||||
resetscreen = reset
|
||||
clearscreen = clear
|
||||
@@ -428,12 +439,20 @@ class RawTurtle(TPen, TNavigator): # type: ignore[misc] # Conflicting methods
|
||||
def clearstamp(self, stampid: int | tuple[int, ...]) -> None: ...
|
||||
def clearstamps(self, n: int | None = None) -> None: ...
|
||||
def filling(self) -> bool: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
@contextmanager
|
||||
def fill(self) -> Generator[None]: ...
|
||||
|
||||
def begin_fill(self) -> None: ...
|
||||
def end_fill(self) -> None: ...
|
||||
def dot(self, size: int | None = None, *color: _Color) -> None: ...
|
||||
def write(
|
||||
self, arg: object, move: bool = False, align: str = "left", font: tuple[str, int, str] = ("Arial", 8, "normal")
|
||||
) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
@contextmanager
|
||||
def poly(self) -> Generator[None]: ...
|
||||
|
||||
def begin_poly(self) -> None: ...
|
||||
def end_poly(self) -> None: ...
|
||||
def get_poly(self) -> _PolygonCoords | None: ...
|
||||
@@ -516,6 +535,11 @@ def tracer(n: int, delay: int | None = None) -> None: ...
|
||||
def delay(delay: None = None) -> int: ...
|
||||
@overload
|
||||
def delay(delay: int) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
@contextmanager
|
||||
def no_animation() -> Generator[None]: ...
|
||||
|
||||
def update() -> None: ...
|
||||
def window_width() -> int: ...
|
||||
def window_height() -> int: ...
|
||||
@@ -534,6 +558,9 @@ def screensize(canvwidth: None = None, canvheight: None = None, bg: None = None)
|
||||
@overload
|
||||
def screensize(canvwidth: int, canvheight: int, bg: _Color | None = None) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def save(filename: StrPath, *, overwrite: bool = False) -> None: ...
|
||||
|
||||
onscreenclick = onclick
|
||||
resetscreen = reset
|
||||
clearscreen = clear
|
||||
@@ -705,10 +732,20 @@ def stamp() -> Any: ...
|
||||
def clearstamp(stampid: int | tuple[int, ...]) -> None: ...
|
||||
def clearstamps(n: int | None = None) -> None: ...
|
||||
def filling() -> bool: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
@contextmanager
|
||||
def fill() -> Generator[None]: ...
|
||||
|
||||
def begin_fill() -> None: ...
|
||||
def end_fill() -> None: ...
|
||||
def dot(size: int | None = None, *color: _Color) -> 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):
|
||||
@contextmanager
|
||||
def poly() -> Generator[None]: ...
|
||||
|
||||
def begin_poly() -> None: ...
|
||||
def end_poly() -> None: ...
|
||||
def get_poly() -> _PolygonCoords | None: ...
|
||||
|
||||
Reference in New Issue
Block a user