mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
turtle: add RawTurtle.screens (#6594)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from tkinter import Canvas, PhotoImage
|
||||
from tkinter import Canvas, Frame, PhotoImage
|
||||
from typing import Any, Callable, Dict, Sequence, Tuple, TypeVar, Union, overload
|
||||
|
||||
# Note: '_Color' is the alias we use for arguments and _AnyColor is the
|
||||
@@ -18,6 +18,8 @@ _PolygonCoords = Sequence[Tuple[float, float]]
|
||||
# Vec2D is actually a custom subclass of 'tuple'.
|
||||
Vec2D = Tuple[float, float]
|
||||
|
||||
class ScrolledCanvas(Frame): ...
|
||||
|
||||
class TurtleScreenBase(object):
|
||||
cv: Canvas
|
||||
canvwidth: int
|
||||
@@ -206,6 +208,7 @@ class TPen(object):
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class RawTurtle(TPen, TNavigator):
|
||||
screens: list[ScrolledCanvas | Canvas | TurtleScreen]
|
||||
def __init__(
|
||||
self, canvas: Canvas | TurtleScreen | None = ..., shape: str = ..., undobuffersize: int = ..., visible: bool = ...
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user