[issue30779] IDLE: configdialog -- factor out Changes class

Terry J. Reedy report at bugs.python.org
Thu Jul 6 23:45:44 EDT 2017


Terry J. Reedy added the comment:

Whoops, we seems to have partly overlapped (and made some of the same changes).  I plan to push my PR sometime tomorrow (it also changes configdialog and revised tests) after looking as yours.  Then move on to adding config tests, #30780.

The tests for config need the real config parsers, except for save.  But to fully test config, a mock save is needed.  I opened #30868 for this.

set_value (set_user_value) accesses neither configdialog nor changes.  So it is a function rather than a method, and I could have put it in config as such.  I added it as a staticmethod just above save_all instead because it is only used by save_all.

Any other of the now 74 methods of ConfigDialog that are not really methods thereof (don't use self) should also be removed and made module functions, in either module, or possibly changes methods.  I just want them tested first, if possible.

I *would* like to put all the extension changes in changes instead of some in a separate structure.  I believe the 'hard' part is that key changes have to be handled separately from the non-extension keys.  The code was contributed by someone else and once I determined that it worked by manual testing, I left it alone. Testing and moving and possibly rewriting the extension stuff would be a coherent issue and PR.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30779>
_______________________________________


More information about the Python-bugs-list mailing list