MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / close

Method close

pager_lib/tqdm/tk.py:101–125  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

99 self._tk_window.grab_set()
100
101 def close(self):
102 if self.disable:
103 return
104
105 self.disable = True
106
107 with self.get_lock():
108 self._instances.remove(self)
109
110 def _close():
111 self._tk_window.after('idle', self._tk_window.destroy)
112 if not self._tk_dispatching:
113 self._tk_window.update()
114
115 self._tk_window.protocol("WM_DELETE_WINDOW", _close)
116
117 # if leave is set but we are self-dispatching, the left window is
118 # totally unresponsive unless the user manually dispatches
119 if not self.leave:
120 _close()
121 elif not self._tk_dispatching:
122 if self._warn_leave:
123 warn("leave flag ignored if not in tkinter mainloop",
124 TqdmWarning, stacklevel=2)
125 _close()
126
127 def clear(self, *_, **__):
128 pass

Callers 1

cancelMethod · 0.95

Calls 1

get_lockMethod · 0.80

Tested by

no test coverage detected