mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
turtle.pyi: Add functions copied from _Screen (#5104)
The turtle module re-exports methods of its classes as top-level functions. Typeshed includes most of these, but `exitonclick` and others from the `_Screen` class were missing. Add them. Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
@@ -295,8 +295,6 @@ class _Screen(TurtleScreen):
|
||||
def bye(self) -> None: ...
|
||||
def exitonclick(self) -> None: ...
|
||||
|
||||
def Screen() -> _Screen: ...
|
||||
|
||||
class Turtle(RawTurtle):
|
||||
def __init__(self, shape: str = ..., undobuffersize: int = ..., visible: bool = ...) -> None: ...
|
||||
|
||||
@@ -381,6 +379,14 @@ if sys.version_info >= (3,):
|
||||
def onkeypress(fun: Callable[[], Any], key: Optional[str] = ...) -> None: ...
|
||||
onkeyrelease = onkey
|
||||
|
||||
# Functions copied from _Screen:
|
||||
|
||||
def setup(width: float = ..., height: float = ..., startx: Optional[int] = ..., starty: Optional[int] = ...) -> None: ...
|
||||
def title(titlestring: str) -> None: ...
|
||||
def bye() -> None: ...
|
||||
def exitonclick() -> None: ...
|
||||
def Screen() -> _Screen: ...
|
||||
|
||||
# Functions copied from TNavigator:
|
||||
|
||||
def degrees(fullcircle: float = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user