diff --git a/docs/conf.py b/docs/conf.py index b55eaa893..e8a07a34d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -60,6 +60,9 @@ 'sphinxcontrib_dooble', ] +# Include a separate entry for __init__ docstring, where provided. +napoleon_include_init_with_doc = True + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/rx/subjects/behaviorsubject.py b/rx/subjects/behaviorsubject.py index 93ee7c65f..35702985b 100644 --- a/rx/subjects/behaviorsubject.py +++ b/rx/subjects/behaviorsubject.py @@ -20,9 +20,9 @@ def __init__(self, value): creates a subject that caches its last value and starts with the specified value. - Keyword parameters: - :param T value: Initial value sent to observers when no other - value has been received by the subject yet. + Args: + value: Initial value sent to observers when no other value has been + received by the subject yet. """ super(BehaviorSubject, self).__init__() @@ -73,7 +73,7 @@ def on_completed(self) -> None: o.on_completed() def on_error(self, error: Exception) -> None: - """Notifie all subscribed observers with the exception.""" + """Notifies all subscribed observers with the exception.""" os = None with self.lock: self.check_disposed() @@ -88,7 +88,7 @@ def on_error(self, error: Exception) -> None: o.on_error(error) def on_next(self, value: Any) -> None: - """Notifie all subscribed observers with the value.""" + """Notifies all subscribed observers with the value.""" os = None with self.lock: self.check_disposed() @@ -103,7 +103,7 @@ def dispose(self) -> None: """Release all resources. Releases all resources used by the current instance of the - ReplaySubject class and unsubscribe all observers. + BehaviorSubject class and unsubscribe all observers. """ with self.lock: self.is_disposed = True