mirror of
https://github.com/python/cpython.git
synced 2025-08-09 19:38:42 +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 commit50cf4991c4
) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit9fabcfbe68
) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
parent
cc6d8f8828
commit
1d4d44c385
10 changed files with 77 additions and 3 deletions
22
Lib/idlelib/util.py
Normal file
22
Lib/idlelib/util.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
"""
|
||||
Idlelib objects with no external idlelib dependencies
|
||||
which are needed in more than one idlelib module.
|
||||
|
||||
They are included here because
|
||||
a) they don't particularly belong elsewhere; or
|
||||
b) because inclusion here simplifies the idlelib dependency graph.
|
||||
|
||||
TODO:
|
||||
* Python versions (editor and help_about),
|
||||
* tk version and patchlevel (pyshell, help_about, maxos?, editor?),
|
||||
* std streams (pyshell, run),
|
||||
* warning stuff (pyshell, run).
|
||||
"""
|
||||
from os import path
|
||||
|
||||
# .pyw is for Windows; .pyi is for stub files.
|
||||
py_extensions = ('.py', '.pyw', '.pyi') # Order needed for open/save dialogs.
|
||||
|
||||
if __name__ == '__main__':
|
||||
from unittest import main
|
||||
main('idlelib.idle_test.test_util', verbosity=2)
|
Loading…
Add table
Add a link
Reference in a new issue