mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
turtle: improve RawTurtle.screen(s) types (#6603)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from tkinter import Canvas, Frame, PhotoImage
|
||||
from typing import Any, Callable, Dict, Sequence, Tuple, TypeVar, Union, overload
|
||||
from typing import Any, Callable, ClassVar, Dict, Sequence, Tuple, TypeVar, Union, overload
|
||||
|
||||
# Note: '_Color' is the alias we use for arguments and _AnyColor is the
|
||||
# alias we use for return types. Really, these two aliases should be the
|
||||
@@ -208,7 +208,8 @@ class TPen(object):
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class RawTurtle(TPen, TNavigator):
|
||||
screens: list[ScrolledCanvas | Canvas | TurtleScreen]
|
||||
screen: TurtleScreen
|
||||
screens: ClassVar[list[TurtleScreen]]
|
||||
def __init__(
|
||||
self, canvas: Canvas | TurtleScreen | None = ..., shape: str = ..., undobuffersize: int = ..., visible: bool = ...
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user