-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-89610: Add syntax highlighting for .pyi
files in IDLE
#28950
gh-89610: Add syntax highlighting for .pyi
files in IDLE
#28950
Conversation
This commit adds syntax highlighting for `.pyi` files in IDLE. It also adds an option to open Python stub files in the "File-open" dialogue, and an option to save a file as a `.pyi` file in the "File-save" dialogue.
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
… docstrings to keep line length within 72 chars
@terryjreedy, would this be easier to review if I split it into several smaller PRs? 🙂 I'm happy to do so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides inline comments, add file requested on issue.
Lib/idlelib/idle_test/test_util.py
Outdated
from idlelib import util | ||
|
||
|
||
class ExtensionTest(unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will condense the extension tests.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
Thanks for all your help, Terry. Let me know if there's anything else you'd like me to do! |
Reread the diff. Try the open on your system if different from Windows. |
Thanks @AlexWaygood for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
Sorry, @AlexWaygood and @terryjreedy, I could not cleanly backport this to |
Sorry @AlexWaygood and @terryjreedy, I had trouble checking out the |
…-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 50cf499)
GH-31303 is a backport of this pull request to the 3.10 branch. |
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 50cf499) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
…-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 50cf499) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 9fabcfb) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
GH-31306 is a backport of this pull request to the 3.9 branch. |
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 50cf499) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 9fabcfb) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Thanks for all the time you spent reviewing this, @terryjreedy! Hugely appreciate it. |
…-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 50cf499) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 9fabcfb) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
.pyi
files in IDLE.pyi
files in IDLE
This commit adds syntax highlighting for
.pyi
files in IDLE.It also adds an option to open Python stub files in the "File-open" dialogue,
and an option to save a file as a
.pyi
file in the "File-save" dialogue.