-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-94520: Make CallTips selectable in IDLE #143029
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
base: main
Are you sure you want to change the base?
Conversation
picnixz
left a comment
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 don't understand why the splitting algorithm got changed as well and why some tests were removed.
| Return the string obtained by replacing the leftmost non-overlapping \ | ||
| occurrences of pattern in string by the replacement repl.''') | ||
|
|
||
| def test_signature_wrap(self): |
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 think we are still checking the wrapping here so I would prefer keeping the test name.
| def test_signature_wrap(self): | ||
| def test_signature(self): | ||
| if textwrap.TextWrapper.__doc__ is not None: | ||
| self.assertEqual(get_spec(textwrap.TextWrapper), '''\ |
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.
Can we avoid only checking the first line? please check the entire docstring (it also helps reducing the diff)
| "aaaaaaaaaa')" | ||
| "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')" | ||
| sbar = "(s='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"\ | ||
| "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n" + indent + "aaaaaaaaa"\ |
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.
Why are we changing those tests?
|
|
||
| @unittest.skipIf(MISSING_C_DOCSTRINGS, | ||
| "Signature information for builtins requires docstrings") | ||
| def test_multiline_docstring(self): |
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.
Why are we removing this test?
| Make CallTips selectable | ||
|
|
||
| The text display widget in the "CalltipWindow" has been changed from | ||
| "tk.Label" to "ScrolledText", and now the text in the "Calltip" window can | ||
| be selected with mouse. The display size of the "CalltipWindow" is set to | ||
| the smaller value between the size when using the "tk.Label" widget and the | ||
| default size of "tk.Text". When the displayed text exceeds the display area | ||
| of the "ScrolledText" window, showing the vertical scrollbar; otherwise, | ||
| hiding the scrollbar. Since more text can be displayed, "argspec" is no | ||
| longer truncated, and the tests related to the max lines or text truncation | ||
| have been removed from the unit tests. Contributed by Shixian Li. |
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.
Pleae make it shorter. There is a lot of text and I don't think everything is needed.
|
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 |
Issue: #94520
The text display widget in the "CalltipWindow" has been changed from "tk.Label" to "ScrolledText", and now the text in the "Calltip" window can be selected with mouse.
The display size of the "CalltipWindow" is set to the smaller value between the size when using the "tk.Label" widget and the default size of "tk.Text".
When the displayed text exceeds the display area of the "ScrolledText" window, showing the vertical scrollbar; otherwise, hiding the scrollbar.
Since more text can be displayed, "argspec" is no longer truncated, and the tests related to the max lines or text truncation have been removed from the unit tests.
I'm sorry for the long delay due to moving house, many data on my computer was lost, it tooks me a very long time to reorganize. But now we can restart.