MCPcopy Index your code
hub / github.com/python/cpython / Editor

Class Editor

Lib/idlelib/idle_test/mock_idle.py:40–51  ·  view source on GitHub ↗

Minimally imitate editor.EditorWindow class.

Source from the content-addressed store, hash-verified

38
39
40class Editor:
41 '''Minimally imitate editor.EditorWindow class.
42 '''
43 def __init__(self, flist=None, filename=None, key=None, root=None,
44 text=None): # Allow real Text with mock Editor.
45 self.text = text or Text()
46 self.undo = UndoDelegator()
47
48 def get_selection_indices(self):
49 first = self.text.index('1.0')
50 last = self.text.index('end')
51 return first, last
52
53
54class UndoDelegator:

Callers 3

test_initMethod · 0.70
setUpClassMethod · 0.70
setUpClassMethod · 0.70

Calls

no outgoing calls

Tested by 3

test_initMethod · 0.56
setUpClassMethod · 0.56
setUpClassMethod · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…