bpo-31050: IDLE: Factor GenPage class from ConfigDialog by csabella · Pull Request #2952 · python/cpython
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add blurb with
bpo-31004: Factor FontPage(Frame) class from ConfigDialog.
The slightly modified tests continue to pass.
Patch by Cheryl Sabella.
|
|
||
| def __init__(self, parent): | ||
| super().__init__(parent) | ||
| self.parent = parent |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete unneeded line. See below.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| (*)helplist: ListBox | ||
| scroll_helplist: Scrollbar | ||
| """ | ||
| parent = self.parent |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete and replace 'parent' with 'self' in the 4 statements below.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
|
||
| # Create widgets: | ||
| # body and section frames. | ||
| frame = self |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete and carefully replace '(frame,' with '(self,' in the next four statements. (I believe that these are the only one that need it.)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| self.button_helplist_add.pack(side=TOP, anchor=W) | ||
| self.button_helplist_remove.pack(side=TOP, anchor=W, pady=5) | ||
|
|
||
| return frame |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete return line.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| StringVar(parent), ('main', 'EditorWindow', 'height')) | ||
|
|
||
| # Create widgets: | ||
| # body and section frames. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete 'body and '
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| # for num in range(1, len(self.user_helplist) + 1): | ||
| # changes.add_option( | ||
| # 'main', 'HelpFiles', str(num), | ||
| # ';'.join(self.user_helplist[num-1][:2])) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With tests passing, delete the entire commented out block above.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| page.upc = page.update_help_changes = Func() | ||
|
|
||
| @classmethod | ||
| def tearDownClass(cls): |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add 'page = cls.page' and simplify next 4 lines.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.