From 3c8b1bde99578d9d01d4b020916e9b3b70953195 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sat, 16 Dec 2023 19:51:25 -0500 Subject: [PATCH] IDLE: Add util and stub example comments (GH-113222) (cherry picked from commit cde1335485b7bffb12c378d230ae48ad77d76ab1) Co-authored-by: Terry Jan Reedy --- Lib/idlelib/idle_test/example_stub.pyi | 2 ++ Lib/idlelib/util.py | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Lib/idlelib/idle_test/example_stub.pyi b/Lib/idlelib/idle_test/example_stub.pyi index a9811a78d10a6e..17b58010a9d8de 100644 --- a/Lib/idlelib/idle_test/example_stub.pyi +++ b/Lib/idlelib/idle_test/example_stub.pyi @@ -1,2 +1,4 @@ +" Example to test recognition of .pyi file as Python source code. + class Example: def method(self, argument1: str, argument2: list[int]) -> None: ... diff --git a/Lib/idlelib/util.py b/Lib/idlelib/util.py index 5ac69a7b94cb56..a7ae74b0579004 100644 --- a/Lib/idlelib/util.py +++ b/Lib/idlelib/util.py @@ -13,9 +13,9 @@ * warning stuff (pyshell, run). """ -# .pyw is for Windows; .pyi is for stub files. -py_extensions = ('.py', '.pyw', '.pyi') # Order needed for open/save dialogs. - +# .pyw is for Windows; .pyi is for typing stub files. +# The extension order is needed for iomenu open/save dialogs. +py_extensions = ('.py', '.pyw', '.pyi') if __name__ == '__main__': from unittest import main