From d5c37811c5fa13681dc46babe9f20247f45d3add Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Sun, 27 Jul 2025 13:33:30 +0200 Subject: [PATCH] Remove obsolete comments from turtle.pyi (#14474) While it would be possible to use the hack described in the comment now that pytype support has been removed, that hack is a bit too "magical" for stubs that are supposed to be fairly straight-forward API descriptions. This would also introduce extra stub-only attributes and would imply that e.g. `_Screen.setup()` and `setup()` refer to the same object at runtime when they don't. --- stdlib/turtle.pyi | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/stdlib/turtle.pyi b/stdlib/turtle.pyi index 9c62c64e7..e036a6e3c 100644 --- a/stdlib/turtle.pyi +++ b/stdlib/turtle.pyi @@ -487,19 +487,8 @@ Pen = Turtle def write_docstringdict(filename: str = "turtle_docstringdict") -> None: ... -# Note: it's somewhat unfortunate that we have to copy the function signatures. -# It would be nice if we could partially reduce the redundancy by doing something -# like the following: -# -# _screen: Screen -# clear = _screen.clear -# -# However, it seems pytype does not support this type of syntax in pyi files. - # Functions copied from TurtleScreenBase: -# Note: mainloop() was always present in the global scope, but was added to -# TurtleScreenBase in Python 3.0 def mainloop() -> None: ... def textinput(title: str, prompt: str) -> str | None: ... def numinput(