Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7e30c96

Browse files
committedJun 4, 2019
Make sure both class and __init__ docstring are included
1 parent 723b625 commit 7e30c96

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed
 

‎docs/conf.py

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
'sphinxcontrib_dooble',
6161
]
6262

63+
# Include a separate entry for __init__ docstring, where provided.
64+
napoleon_include_init_with_doc = True
65+
6366
# Add any paths that contain templates here, relative to this directory.
6467
templates_path = ['_templates']
6568

‎rx/subjects/behaviorsubject.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def __init__(self, value):
2020
creates a subject that caches its last value and starts with the
2121
specified value.
2222
23-
Keyword parameters:
24-
:param T value: Initial value sent to observers when no other
25-
value has been received by the subject yet.
23+
Args:
24+
value: Initial value sent to observers when no other value has been
25+
received by the subject yet.
2626
"""
2727

2828
super(BehaviorSubject, self).__init__()
@@ -73,7 +73,7 @@ def on_completed(self) -> None:
7373
o.on_completed()
7474

7575
def on_error(self, error: Exception) -> None:
76-
"""Notifie all subscribed observers with the exception."""
76+
"""Notifies all subscribed observers with the exception."""
7777
os = None
7878
with self.lock:
7979
self.check_disposed()
@@ -88,7 +88,7 @@ def on_error(self, error: Exception) -> None:
8888
o.on_error(error)
8989

9090
def on_next(self, value: Any) -> None:
91-
"""Notifie all subscribed observers with the value."""
91+
"""Notifies all subscribed observers with the value."""
9292
os = None
9393
with self.lock:
9494
self.check_disposed()
@@ -103,7 +103,7 @@ def dispose(self) -> None:
103103
"""Release all resources.
104104
105105
Releases all resources used by the current instance of the
106-
ReplaySubject class and unsubscribe all observers.
106+
BehaviorSubject class and unsubscribe all observers.
107107
"""
108108
with self.lock:
109109
self.is_disposed = True

0 commit comments

Comments
 (0)
Please sign in to comment.