update
This commit is contained in:
14
.CondaPkg/env/Lib/idlelib/config.py
vendored
14
.CondaPkg/env/Lib/idlelib/config.py
vendored
@@ -158,8 +158,9 @@ class IdleConf:
|
||||
self.defaultCfg = {}
|
||||
self.userCfg = {}
|
||||
self.cfg = {} # TODO use to select userCfg vs defaultCfg
|
||||
|
||||
# See https://bugs.python.org/issue4630#msg356516 for following.
|
||||
# self.blink_off_time = <first editor text>['insertofftime']
|
||||
# See https:/bugs.python.org/issue4630, msg356516.
|
||||
|
||||
if not _utest:
|
||||
self.CreateConfigHandlers()
|
||||
@@ -597,7 +598,9 @@ class IdleConf:
|
||||
problem getting any core binding there will be an 'ultimate last
|
||||
resort fallback' to the CUA-ish bindings defined here.
|
||||
"""
|
||||
# TODO: = dict(sorted([(v-event, keys), ...]))?
|
||||
keyBindings={
|
||||
# virtual-event: list of key events.
|
||||
'<<copy>>': ['<Control-c>', '<Control-C>'],
|
||||
'<<cut>>': ['<Control-x>', '<Control-X>'],
|
||||
'<<paste>>': ['<Control-v>', '<Control-V>'],
|
||||
@@ -880,7 +883,7 @@ def _dump(): # htest # (not really, but ignore in coverage)
|
||||
line, crc = 0, 0
|
||||
|
||||
def sprint(obj):
|
||||
global line, crc
|
||||
nonlocal line, crc
|
||||
txt = str(obj)
|
||||
line += 1
|
||||
crc = crc32(txt.encode(encoding='utf-8'), crc)
|
||||
@@ -889,7 +892,7 @@ def _dump(): # htest # (not really, but ignore in coverage)
|
||||
|
||||
def dumpCfg(cfg):
|
||||
print('\n', cfg, '\n') # Cfg has variable '0xnnnnnnnn' address.
|
||||
for key in sorted(cfg.keys()):
|
||||
for key in sorted(cfg):
|
||||
sections = cfg[key].sections()
|
||||
sprint(key)
|
||||
sprint(sections)
|
||||
@@ -904,8 +907,11 @@ def _dump(): # htest # (not really, but ignore in coverage)
|
||||
dumpCfg(idleConf.userCfg)
|
||||
print('\nlines = ', line, ', crc = ', crc, sep='')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from unittest import main
|
||||
main('idlelib.idle_test.test_config', verbosity=2, exit=False)
|
||||
|
||||
# Run revised _dump() as htest?
|
||||
_dump()
|
||||
# Run revised _dump() (700+ lines) as htest? More sorting.
|
||||
# Perhaps as window with tabs for textviews, making it config viewer.
|
||||
|
||||
Reference in New Issue
Block a user