mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
bpo-45447: Add syntax highlighting for .pyi files in IDLE (GH-28950)
Also add .pyi to the python extensions in the "File-open" and "File-save" dialogues.
Add util.py to contain objects that are used in multiple idlelib modules
and have no dependencies on any of them.
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 50cf4991c4)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
b7a65c939c
commit
9fabcfbe68
10 changed files with 77 additions and 3 deletions
|
|
@ -11,6 +11,9 @@
|
|||
|
||||
import idlelib
|
||||
from idlelib.config import idleConf
|
||||
from idlelib.util import py_extensions
|
||||
|
||||
py_extensions = ' '.join("*"+ext for ext in py_extensions)
|
||||
|
||||
encoding = 'utf-8'
|
||||
if sys.platform == 'win32':
|
||||
|
|
@ -348,7 +351,7 @@ def print_window(self, event):
|
|||
savedialog = None
|
||||
|
||||
filetypes = (
|
||||
("Python files", "*.py *.pyw", "TEXT"),
|
||||
("Python files", py_extensions, "TEXT"),
|
||||
("Text files", "*.txt", "TEXT"),
|
||||
("All files", "*"),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue