diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2022-02-13 00:52:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-13 00:52:37 (GMT) |
commit | 9fabcfbe68ff81ef5f17f86a93daf9cce9d83876 (patch) | |
tree | 85e79df4004c90260ec0a46ca3ec8a128abfe6e3 /Lib/idlelib/util.py | |
parent | b7a65c939c93e7910abc8c9d4a129ff385714824 (diff) | |
download | cpython-9fabcfbe68ff81ef5f17f86a93daf9cce9d83876.zip cpython-9fabcfbe68ff81ef5f17f86a93daf9cce9d83876.tar.gz cpython-9fabcfbe68ff81ef5f17f86a93daf9cce9d83876.tar.bz2 |
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 50cf4991c49e19f917305dd7b9c71085c11edddb)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Lib/idlelib/util.py')
-rw-r--r-- | Lib/idlelib/util.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Lib/idlelib/util.py b/Lib/idlelib/util.py new file mode 100644 index 0000000..5480219 --- /dev/null +++ b/Lib/idlelib/util.py @@ -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) |