Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Config changes responding to Cheryl's comments.
  • Loading branch information
terryjreedy committed Jul 7, 2017
commit 67d5ea143b146570840bc14c26cdedfd15ea02b6
6 changes: 3 additions & 3 deletions Lib/idlelib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class IdleConf:
(user home dir)/.idlerc/config-{config-type}.cfg
"""
def __init__(self):
self.config_types = ('main', 'extensions', 'highlight', 'keys')
self.config_types = ('main', 'highlight', 'keys', 'extensions')
self.defaultCfg = {}
self.userCfg = {}
self.cfg = {} # TODO use to select userCfg vs defaultCfg
Expand Down Expand Up @@ -800,7 +800,7 @@ class ConfigChanges(dict):
def __init__(self):
"Create a page for each configuration file"
self.pages = [] # List of unhashable dicts.
for config_type in ('main', 'highlight', 'keys', 'extensions'):
for config_type in idleConf.config_types:
self[config_type] = {}
self.pages.append(self[config_type])

Expand Down Expand Up @@ -828,7 +828,7 @@ def save_option(config_type, section, item, value):
def save_all(self):
"""Save configuration changes to the user config file.

When clear self in preparation for additional changes.
Then clear self in preparation for additional changes.
"""
idleConf.userCfg['main'].Save()
for config_type in self:
Expand Down
2 changes: 1 addition & 1 deletion Lib/idlelib/idle_test/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class ChangesTest(unittest.TestCase):

empty = {'main':{}, 'highlight':{}, 'keys':{}, 'extensions':{}}

def load(self):
def load(self): # Test_add_option verifies that this works.
changes = self.changes
changes.add_option('main', 'Msec', 'mitem', 'mval')
changes.add_option('highlight', 'Hsec', 'hitem', 'hval')
Expand Down