New submission from Terry J. Reedy:

Among other things, #30777 added docstrings to configdialog.  Those for 
create_page_x methods included a list of 'Configuration attributes' (Tk 
Variables) with an annotation as to what the Var represents.  The list for the 
font tab already helped when writing tests for the tab.

Although the list is redundant with the code, and creates a slight maintenance 
problem if names are changed, I want to add more lists.  The information 
collected together will be helpful even if not 100% perfect.  Beside tests, it 
will help with configdialog maintenance and refactoring, including extracting 
more classes from ConfigDialog.

Rename 'Configuration attributes' to 'Tk Variables'.  For each page, add 'Data 
attributes' (other than the Vars). The annotation can briefly say what it is.  
Add 'Methods' (other than the tk var trace methods) related to that one page 
and if needed, *briefly* what it does (not the whole first line of its 
docstring).  Add 'Widgets bound to self' and the widget class.  Most widget 
names are not bound to self; the ones that are should be the ones that need to 
be referenced elsewhere, whether in other methods or tests.

Expand the single line docstring for create_action_buttons as appropriate.  
Date attributes include globals help_common and help_pages.  Methods include 
the click handlers.  I would like a note on what outside data structure is 
accessed by the click handlers.

Expand the single line create_widgets docstring to include multi-page 
information.  'Page interactions' would have things like "Font vars trigger 
redrawing of highlights sample text."  Such interactions will have to be 
accounted for if we create page classes.  'Tracer Methods' would include the 
methods that affect all tracer methods.  'Other methods' should include 
anything else, unless addition methods groups are defined.

ConfigDialog currently has 71 methods defined by def statements.  (There is 1 
nested def in ConfigDialog and 4 other defs at the end of the file for 76 total 
in the file.) I would like all 64 methods other than __init__ and the 6 create_ 
methods to be accounted for in 1 of the 6 create_ docstrings.  I expect this 
issue to have multiple PRs.

----------
assignee: terry.reedy
components: IDLE
messages: 298244
nosy: csabella, louielu, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Document tk Vars, attributes, methods by tab page
type: enhancement

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30913>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to