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

Method paren_closed_event

Lib/idlelib/parenmatch.py:83–94  ·  view source on GitHub ↗

Handle user input of closer.

(self, event)

Source from the content-addressed store, hash-verified

81 return "break"
82
83 def paren_closed_event(self, event):
84 "Handle user input of closer."
85 # If user bound non-closer to <<paren-closed>>, quit.
86 closer = self.text.get("insert-1c")
87 if closer not in _openers:
88 return
89 hp = HyperParser(self.editwin, "insert-1c")
90 if not hp.is_in_code():
91 return
92 indices = hp.get_surrounding_brackets(_openers[closer], True)
93 self.finish_paren_event(indices)
94 return # Allow calltips to see ')'
95
96 def finish_paren_event(self, indices):
97 if indices is None and self.BELL:

Callers 2

test_paren_stylesMethod · 0.80
test_paren_cornerMethod · 0.80

Calls 5

is_in_codeMethod · 0.95
finish_paren_eventMethod · 0.95
HyperParserClass · 0.90
getMethod · 0.45

Tested by 2

test_paren_stylesMethod · 0.64
test_paren_cornerMethod · 0.64