Skip to content

bpo-31060: IDLE: Finish regrouping ConfigDialog methods #2908

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

Merged
merged 5 commits into from
Jul 27, 2017

Conversation

terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Jul 27, 2017

  • In configdialog: collect hightlight functions under create_page_hightlight.
    WIP

https://bugs.python.org/issue31001

Copy link
Contributor

@csabella csabella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff on the commit for moving things around is impossible, but I ran the htests and it worked without any issues.

@mlouielu
Copy link
Contributor

Diff is dead. I'm not sure about this, but can the tab be split to a module that contain different parts of the tab?

e.g.

 \configdialog
      |---- __init__.py
      |---- tab_font.py
      |---- tab_highlight.py
      |---- .....

@mlouielu
Copy link
Contributor

P.S. For appveyor not building CI, @Haypo gave the workaround to fix this: close the PR and re-open it.

@csabella
Copy link
Contributor

@mlouielu Yes, this is the first steps to moving this into its own class and maybe even into separate modules (Terry hasn't talked about splitting the modules yet.)

@terryjreedy
Copy link
Member Author

I take the comments above to mean that you both noticed also that the diff is crazy and not humanly readable. I did not mean for either of you to try. Git diff insisted on creating replace blocks, with _ and + lines. This diff would be simple if it had one add block with + lines and about five delete blocks with - lines, mimicking what I actually did. Instead git deletes lines I never deleted and adds them back, in little chunks. Perhaps if I had copied everything first, committed, then deleted the old and commited, there would have been two simple commit diffs. But the net result would be the same.

Github can apply its own patch, as indicated by 'Merging can be performed'. Travis did so and tests padded. I just did 'git pr 2908' to make a new branch and the tests ran in the branch.

The human review for the re-arrangement is to verify that var_change methods for all the vars in the docstring (except fg-bg toggle) and all the methods listed actually follow the page method. I just did so by copying the var list and method list into Notepad and checking off each with an X. No need to repeat.

The methods currently have the order they had in the file. I am about to re-arrange them is a more sensible order, though it won't necessarily be the final order. I was planning to continue by redoing the docstring as I have before. Then possibly rename while writing tests. But the net diff for configdialog mixing method movements with real edits would be even worse to read. Instead, I will finish rearranging by page and button groups and within groups as well as I can determine now. I will open a new issue for this.

@terryjreedy
Copy link
Member Author

terryjreedy commented Jul 27, 2017

I have no plan to split the module, just to rearrange and then split the class within the module.

@terryjreedy terryjreedy changed the title bpo-31001: IDLE - Add tests for ConfigDialog highlight tab bpo-31060: IDLE: Finish rearranging ConfigDialog methods Jul 27, 2017
@terryjreedy terryjreedy changed the title bpo-31060: IDLE: Finish rearranging ConfigDialog methods bpo-31060: IDLE: Finish regrouping ConfigDialog methods Jul 27, 2017
together. Do some rearrangements within groups. Check grep of 'def '
against re-arranged version of same grep before movements.
@terryjreedy terryjreedy merged commit b166080 into python:master Jul 27, 2017
@terryjreedy terryjreedy deleted the hilite branch July 27, 2017 22:28
terryjreedy added a commit to terryjreedy/cpython that referenced this pull request Jul 27, 2017
…GH-2908)

Finish resorting the 72 ConfigDialog methods into 7 groups that represent the dialog, action buttons, and font, highlight, keys, general, and extension pages.  This will help with continuing to add tests and improve the pages. It will enable splitting ConfigDialog into 6 or 7 more comprehensible classes.
(cherry picked from commit b166080)
terryjreedy added a commit that referenced this pull request Jul 28, 2017
… (#2925)

Finish resorting the 72 ConfigDialog methods into 7 groups that represent the dialog, action buttons, and font, highlight, keys, general, and extension pages.  This will help with continuing to add tests and improve the pages. It will enable splitting ConfigDialog into 6 or 7 more comprehensible classes.
(cherry picked from commit b166080)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants