Skip to content

Commit bd0c8de

Browse files
committed
docformatter changes before running rstfmt
1 parent 48b3bbb commit bd0c8de

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

src/diffpy/srfit/util/observable.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818

1919

2020
class Observable(object):
21-
"""
22-
Provide notification support for classes that maintain dynamic associations with multiple
23-
clients.
21+
"""Provide notification support for classes that maintain dynamic
22+
associations with multiple clients.
2423
2524
Observers, i.e. clients of the observable, register event handlers that will be invoked to
2625
notify them whenever something interesting happens to the observable. The nature of what is
@@ -41,9 +40,7 @@ class Observable(object):
4140

4241

4342
def notify(self, other=()):
44-
"""
45-
Notify all observers
46-
"""
43+
"""Notify all observers."""
4744
# build a list before notification, just in case the observer's callback behavior
4845
# involves removing itself from our callback set
4946
semaphors = (self,) + other
@@ -54,27 +51,21 @@ def notify(self, other=()):
5451

5552
# callback management
5653
def addObserver(self, callable):
57-
"""
58-
Add callable to the set of observers
59-
"""
54+
"""Add callable to the set of observers."""
6055
f = weak_ref(callable, fallback=_fbRemoveObserver)
6156
self._observers.add(f)
6257
return
6358

6459

6560
def removeObserver(self, callable):
66-
"""
67-
Remove callable from the set of observers
68-
"""
61+
"""Remove callable from the set of observers."""
6962
f = weak_ref(callable)
7063
self._observers.remove(f)
7164
return
7265

7366

7467
def hasObserver(self, callable):
75-
"""
76-
True if `callable` is present in the set of observers.
77-
"""
68+
"""True if `callable` is present in the set of observers."""
7869
f = weak_ref(callable)
7970
rv = f in self._observers
8071
return rv

0 commit comments

Comments
 (0)