Skip to content

Commit 868504e

Browse files
authored
Merge pull request #18818 from anntzer/discocid
DOC: Clarify behavior of CallbackRegistry.disconnect with nonexistent cids.
2 parents 4d2ee90 + 97ba060 commit 868504e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/cbook/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,11 @@ def _remove_proxy(self, proxy, *, _is_finalizing=sys.is_finalizing):
199199
del self._func_cid_map[signal]
200200

201201
def disconnect(self, cid):
202-
"""Disconnect the callback registered with callback id *cid*."""
202+
"""
203+
Disconnect the callback registered with callback id *cid*.
204+
205+
No error is raised if such a callback does not exist.
206+
"""
203207
for eventname, callbackd in list(self.callbacks.items()):
204208
try:
205209
del callbackd[cid]

0 commit comments

Comments
 (0)