Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c68fb31

Browse filesBrowse files
authored
Merge pull request #9692 from matplotlib/auto-backport-of-pr-9687
Backport PR #9687 on branch v2.1.x
2 parents 44b8d41 + a1650f9 commit c68fb31
Copy full SHA for c68fb31

File tree

Expand file treeCollapse file tree

1 file changed

+7
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-9
lines changed

‎lib/matplotlib/cbook/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/cbook/__init__.py
+7-9Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ def _exception_printer(exc):
255255

256256

257257
class CallbackRegistry(object):
258-
"""Handle registering and disconnecting for a set of signals and
259-
callbacks:
258+
"""Handle registering and disconnecting for a set of signals and callbacks:
260259
261260
>>> def oneat(x):
262261
... print('eat', x)
@@ -332,9 +331,7 @@ def __setstate__(self, state):
332331
self.__init__(**state)
333332

334333
def connect(self, s, func):
335-
"""
336-
register *func* to be called when a signal *s* is generated
337-
func will be called
334+
"""Register *func* to be called when signal *s* is generated.
338335
"""
339336
self._func_cid_map.setdefault(s, WeakKeyDictionary())
340337
# Note proxy not needed in python 3.
@@ -363,8 +360,7 @@ def _remove_proxy(self, proxy):
363360
del self._func_cid_map[signal]
364361

365362
def disconnect(self, cid):
366-
"""
367-
disconnect the callback registered with callback id *cid*
363+
"""Disconnect the callback registered with callback id *cid*.
368364
"""
369365
for eventname, callbackd in list(six.iteritems(self.callbacks)):
370366
try:
@@ -381,8 +377,10 @@ def disconnect(self, cid):
381377

382378
def process(self, s, *args, **kwargs):
383379
"""
384-
process signal `s`. All of the functions registered to receive
385-
callbacks on `s` will be called with ``**args`` and ``**kwargs``
380+
Process signal *s*.
381+
382+
All of the functions registered to receive callbacks on *s* will be
383+
called with ``*args`` and ``**kwargs``.
386384
"""
387385
if s in self.callbacks:
388386
for cid, proxy in list(six.iteritems(self.callbacks[s])):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.